TCylinderSpecializeSamplingHelper::ComputeGoldenSpiralPoints

Use the golden spiral method to generate evenly spaced points on a cylinder.

Windows
MacOS
Linux

References

Module

Chaos

Header

/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Cylinder.h

Include

#include "Chaos/Cylinder.h"

Syntax

static void ComputeGoldenSpiralPoints
(
    TArray < TVector < T, 3 >> & Points,
    const TVector < T, 3 > & Origin,
    const TVector < T, 3 > & Axis,
    const T Radius,
    const T Height,
    const int32 NumPoints,
    const bool IncludeEndCaps,
    int32 SpiralSeed
)

Remarks

Use the golden spiral method to generate evenly spaced points on a cylinder.

The "golden" part is derived from the golden ratio; stand at the center, turn a golden ratio of whole turns, then emit a point in that direction.

Points are generated starting from the bottom of the cylinder, ending at the top. Contiguous entries in `Points_ generally will not be spatially adjacent.

Points_ to append to. Origin is the bottom-most point of the cylinder. `Axis is the orientation of the cylinder. Radius_ is the radius of the cylinder. Height is the height of the cylinder. `NumPoints is the number of points to generate. IncludeEndCaps_ determines whether or not points are generated on the end caps of the cylinder. SpiralSeed is the starting index for golden spiral generation. When using this method to continue a spiral started elsewhere, `SpiralSeed should equal the number of particles already created.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback