ProtoFlux:Random Point On Sphere: Difference between revisions

From Resonite Wiki
Created a page for the Random Point On Sphere node.
 
templ
Line 9: Line 9:
|}}
|}}


The '''Random Point On Sphere''' node returns a random [[Type:float3|float3]] value of a point on a [https://en.wikipedia.org/wiki/Unit_sphere unit sphere]. Since the line is where the random generation occurs is on the sphere shell, the X, Y, and Z will be in between <code>-1</code> and <code>1</code> (inclusive to the sphere only).
The '''Random Point On Sphere''' node returns a random [[Type:float3|float3]] value of a point on the shell of a [https://en.wikipedia.org/wiki/Unit_sphere unit sphere].


{{Note|This node constantly changes its value every frame, if you want to use this value, make sure to either [[ProtoFlux:Write|Write]] to a [[ProtoFlux:Data Model Store|Variable]] or use it within that frame.|warning}}
{{ProtoFluxRandomNodeWarning}}


== Outputs ==
== Outputs ==
Line 17: Line 17:
=== * ([[Type:float3|float3]]) ===
=== * ([[Type:float3|float3]]) ===


The random result.
A random point on the unit sphere centered at <code>[0; 0; 0]</code>.


[[Category:ProtoFlux:Math:Random:Point]]
[[Category:ProtoFlux:Math:Random:Point]]

Revision as of 17:23, 14 April 2025

Random Point On Sphere
*
Point

The Random Point On Sphere node returns a random float3 value of a point on the shell of a unit sphere.

This node is a random node. Random nodes generate a new output every time they are accessed during an impulse chain, even if during the same frame. To reuse the same value for multiple impulse nodes, you must write the value to a Local, Store, or Data Model Store before operating on it.

Outputs

* (float3)

A random point on the unit sphere centered at [0; 0; 0].