FTaperedCylinderSpecializeSamplingHelper::ComputeGoldenSpiralPointsUnoriented

Generates points on a tapered cylinder (truncated cone), oriented about the Z axis, varying from [-Height/2, Height/2].

Windows
MacOS
Linux

References

Module

Chaos

Header

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

Include

#include "Chaos/TaperedCylinder.h"

Syntax

static void ComputeGoldenSpiralPointsUnoriented
(
    TArray< FVec3 > & Points,
    const FReal Radius1,
    const FReal Radius2,
    const FReal Height,
    const int32 NumPoints,
    const bool IncludeEndCaps,
    int32 SpiralSeed
)

Remarks

Generates points on a tapered cylinder (truncated cone), oriented about the Z axis, varying from [-Height/2, Height/2].

TODO:

that this method does not produce evenly spaced points! It'll bunch points together on the side of the cylinder with the smaller radius, and spread them apart on the larger. We need a routine that operates in conical space, rather than cylindrical. That said, points are distributed evenly between the two end caps, proportional to their respective areas. 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. Radius1 is the first radius of the tapered cylinder. `Radius2 is the second radius of the tapered 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.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss