|
Torus Builder
By: Tarquin
[email protected]
Tarquin's
UT
This makes a torus, or sections of a torus, and was suggested by purice
at the PlanetUnreal Forums.
Options
- OuterRadius
-
The outer radius.
-
- TubeThickness
-
It might have been more logical to call the radii OverallRadius and
CrossSectionRadius, as suggested on PlanetUnreal forums, but I'd already
written the code, picturing the torus as a bicycle tyre, made from an
inner tube looped to meet itself. This is then the diameter of the
tubing, and will also be the height of the torus. OuterRadius -
TubeThickness = radius of hole in the middle. Note for
mathematicians, topologists and freaks on my wavelength: fiddle with the
way it meets itself and you get a Klein bottle!
-
- WheelSides
-
This is how many times the tubing is bent to make the full loop.
-
- WheelSidesUsed
-
Works like the 2D editor's revolve tool, with an added extra:
leaving this at zero tells the builder to use the value of WheelSides,
so the number of sides of a full torus can be specified without having
to enter two values.
-
- TubeSides
-
The tubing is made from a cylinder with this number of sides.
-
- WheelAlignType
-
'Plain' and 'Side' work the same as the AlignToSide 'False' and
'True' respectively; 'Caps' is a special case of 'Side' which cuts the
first section of a partial torus to the x-axis. This shows the
possible cases, applied to the cylinder builder:
-
-
- TubeAlignToSide
-
This works the same as the 'align to side' option in the native
builders, and changes the alignment of the tube cross-section polygon.
(To get a clear picture of what it does, set WheelSides to 4, TubeSides
to 8, and look at both types in a side view.)
-
- GroupName
-
Works the same as in the native brush builders.
Known issues
I've found that setting sides higher than 16*16 causes some of the
polys not to display. This may be due to the sheer number of polys and BSP
cuts. Personally, I worry that because the vertices have irrational
co-ordinates, what drops off when the floating point variable is rounded
sooner or later becomes significant enough to cause a glitch — but I don't
know enough about how these are handled internally. Contact
me if you find any bugs.
Future development
I'd like to implement Item Naming options, so selecting polys by
matching item gives either sections of tubing, or horizontal bands all the
way round. More details on the future
versions page.
Notes
See main page for legal stuff & disclaimer. |