Reference:Shapes3.inc
Revision as of 20:58, 17 April 2013 by Flohmuller (talk | contribs)
This file contains macros for segments of shapes, facetted shapes and others. Segments of shapes:
Segment_of_Torus ( R_major, R_minor, Segment_Angle )
- Segment of a torus around the y axis. The angle starts at positive x axis.
Segment_of_CylinderRing ( R_out, R_in, Height, Segment_Angle )
- Segment of a cylindrical ring around the y axis. The angle starts at positive x axis.
Segment_of_Object ( Segment_Object, Segment_Angle )
- Segment of an object around the y axis. The angle starts at positive x axis.
Based on min_extend and max_extend.
Angular shapes:
Column_N (N, R_in, Height )
- A regular n-sided column around the y axis, defined by the incircle radius
R_in
.Height
is the height in y direction. Column_N_AB (N, A, B, R_in)
- A regular n-sided column from point
A
to pointB
, defined by the incircle radiusR_in
. Pyramid_N (N, R_in_1, R_in_2, Height )
- A regular n-sided pyramid around the y axis,
defined by the incircle radii:
R_in_1
at y = 0 andR_in_2
at y =Height
. Pyramid_N_AB(N, A, R_in_A, B, R_in_B)
- A regular n-sided column from point
A
to pointB
, defined by the incircle radii:R_in_A
at pointA
andR_in_B
at pointB
.
Facetted shapes:
Facetted_Sphere (Quarter_Segments, Radial_Segments)
- A facetted sphere with incircle radius 1.
Quarter_Segments
= number of equitorial facetts in one quarter (1/2 of the total number).
Radial_Segments
= number of radial facetts. Facetted_Egg_Shape (Quarter_Segments, Radial_Segments, Lower_Scale, Upper_Scale)
- A facetted egg shape. The number of facetts are defined analog to
Facetted_Egg_Shape()
.
Equitorial incircle radius = 1. Lower half scaled in y byLower_Scale
, Upper half scaled in y byUpper_Scale
. Facetted_Egg (N_Quarter_Segments, N_Radial_Segments)
- A facetted egg with total height = 2. Lower half scaled in y by 1.15, Upper half scaled in y by 1.55.
Round shapes:
Egg_Shape (Lower_Scale, Upper_Scale)
- An egg shape with equitorial radius 1.
Lower half scaled in y byLower_Scale
, Upper half scaled in y byUpper_Scale
. Egg
- Uses the macro Egg_Shape.
Lower half scaled in y by 1.15, upper half scaled in y by 1.55.
Wireframe shape (mostly also optionally filled:
Ring_Sphere (Rmaj_H, Rmaj_V, Rmin_H, Rmin_V, Number_of_Rings_horizontal, Number_of_Rings_vertical)
- A wireframe sphere by vertical and horizontal torii.
Horizontal tori: equatorial radius majorRmaj_H
, radius minorRmin_H
.
Vertical tori: radius majorRmaj_V
, radius minorRmin_V
. Round_Pyramid_N_out (N, A, CornerR_out_A, B, CornerR_out_B, R_Border, Filled, Merge )
- A regular n-sided column from point
A
to pointB
, defined by the outcircle radii:R_in_A
at pointA
andR_in_B
at pointB
. Round_Pyramid_N_in (N, A, FaceR_in_A, B, FaceR_in_B, R_Border, Filled, Merge_On )
- A regular n-sided column from point
A
to pointB
, defined by the incircle radii:R_in_A
at pointA
andR_in_B
at pointB
.. Round_Cylinder_Tube( A, B, R_out, R_border, Filled, Merge)
- A cylindrical tube from point
A
to pointB
, with the outer radiusR_out
and the border radiusR_border
. The inner radius isR_out - R_border
.
WithFilled
= 1 we get aRound_Cylinder
. Rounded_Tube( R_out, R_in, R_Border, Height, Merge)
- A cylindrical tube around the y axis with the
Height
in y, with the outer radiusR_out
, the inner radiusR_in
and the radius of the rounded bordersR_border
. Rounded_Tube_AB( A, B, R_out, R_in, R_Border, Merge)
- A cylindrical tube from point
A
to pointB
.
The outer radius isR_out
, the inner radius isR_in
and the radius of the rounded borders isR_border
. Round_Conic_Torus( Center_Distance, R_upper, R_lower, R_border, Merge)
- A toroid ring the z axis,
with the lower torus part at y = 0 and the upper part at y = Center_Distance.
The radius of the lower part isR_lower
, the radius of the lower part isR_lower
The minor radius of the toroid isR_border
. Round_Conic_Prism( Center_Distance, R_upper, R_lower, Length_Zminus, R_Border, Merge)
- A shape of the toroidal form like
Round_Conic_Torus()
, but filled and in the negativ z direction with the lengthLength_Zminus
. Half_Hollowed_Rounded_Cylinder1( Length, R_out, R_border, BorderScale, Merge)
- A hollowed half rounded cylinder with the
Length
in x, of the outer radiusR_out
, with round ends. The borders have a minor radiusR_border
with the scale in yBorderScale
.
The inner radius isR_out - R_border
. Half_Hollowed_Rounded_Cylinder2( Length, R_out, R_corner, R_border, BorderScale, Merge)
- A hollowed half rounded cylinder with the
Length
in x, of the outer radiusR_out
, with flat ends. The corners have a minor radius ofR_corner
, the borders have a minor radius ofR_border
with the scale in yBorderScale
.
The inner radius isR_out - R_border
, the inner lenght isLength - 2*R_border
. Round_N_Tube_Polygon (N, Tube_R, R_incircle, Edge_R, Filled, Merge)
- A regular polygon with
N
edges (or corners) with incircle radiusR_incircle
, formed by a tube with the minor radiusTube_R
. The corners are formed by torus segments with the major radius radiusEdge_R
.