Difference between revisions of "Reference:Shapes3.inc"
Jump to navigation
Jump to search
Flohmuller (talk | contribs) |
m |
||
| (8 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Include Files]] | [[Category:Include Files]] | ||
| − | This file contains macros for segments of shapes, facetted shapes and others. | + | <p>This file contains macros for segments of shapes, facetted shapes and others.</p> |
| − | Segments of shapes: | + | |
| + | <p><strong>Segments of shapes:</strong></p> | ||
<dl> | <dl> | ||
<dt><code>Segment_of_Torus ( R_major, R_minor, Segment_Angle )</code><!--</dt>---> | <dt><code>Segment_of_Torus ( R_major, R_minor, Segment_Angle )</code><!--</dt>---> | ||
| − | + | <dd>Segment of a torus around the y axis. The angle starts at positive x axis.<!--</dd>---> | |
| − | + | ||
<dt><code>Segment_of_CylinderRing ( R_out, R_in, Height, Segment_Angle )</code><!--</dt>---> | <dt><code>Segment_of_CylinderRing ( R_out, R_in, Height, Segment_Angle )</code><!--</dt>---> | ||
| − | + | <dd>Segment of a cylindrical ring around the y axis. The angle starts at positive x axis.<!--</dd>---> | |
<dt><code>Segment_of_Object ( Segment_Object, Segment_Angle )</code><!--</dt>---> | <dt><code>Segment_of_Object ( Segment_Object, Segment_Angle )</code><!--</dt>---> | ||
| − | + | <dd>Segment of an object around the y axis. The angle starts at positive x axis.<br> | |
| − | + | Based on min_extend and max_extend.<!--</dd>---> | |
</dl> | </dl> | ||
| − | Angular shapes: | + | <p><strong>Angular shapes:</strong></p> |
<dl> | <dl> | ||
<dt><code>Column_N (N, R_in, Height )</code><!--</dt>---> | <dt><code>Column_N (N, R_in, Height )</code><!--</dt>---> | ||
| − | + | <dd>A regular n-sided column around the y axis, defined by the incircle radius <code>R_in</code>. <code>Height</code> is the height in y direction.<!--</dd>---> | |
| − | |||
<dt><code>Column_N_AB (N, A, B, R_in)</code><!--</dt>---> | <dt><code>Column_N_AB (N, A, B, R_in)</code><!--</dt>---> | ||
| − | + | <dd>A regular n-sided column from point <code>A</code> to point <code>B</code>, defined by the incircle radius <code>R_in</code>.<!--</dd>---> | |
| − | |||
<dt><code>Pyramid_N (N, R_in_1, R_in_2, Height )</code><!--</dt>---> | <dt><code>Pyramid_N (N, R_in_1, R_in_2, Height )</code><!--</dt>---> | ||
| − | + | <dd>A regular n-sided pyramid around the y axis, defined by the incircle radii:<br> | |
| − | + | <code>R_in_1</code> at y = 0 and <code>R_in_2</code> at y = <code>Height</code>.<!--</dd>---> | |
| − | |||
<dt><code>Pyramid_N_AB(N, A, R_in_A, B, R_in_B)</code><!--</dt>---> | <dt><code>Pyramid_N_AB(N, A, R_in_A, B, R_in_B)</code><!--</dt>---> | ||
| − | + | <dd>A regular n-sided column from point <code>A</code> to point <code>B</code>, | |
| − | + | defined by the incircle radii:<br> | |
| − | + | <code>R_in_A</code> at point <code>A</code> and <code>R_in_B</code> at point <code>B</code>.<!--</dd>---> | |
</dl> | </dl> | ||
| − | Facetted shapes: | + | <p><strong>Facetted shapes:</strong></p> |
<dl> | <dl> | ||
<dt><code>Facetted_Sphere (Quarter_Segments, Radial_Segments)</code><!--</dt>---> | <dt><code>Facetted_Sphere (Quarter_Segments, Radial_Segments)</code><!--</dt>---> | ||
| − | + | <dd>A facetted sphere with incircle radius 1.<br> | |
| − | + | <code>Quarter_Segments</code> = number of equitorial facetts in one quarter (1/2 of the total number).<br> | |
| − | + | <code>Radial_Segments</code> = number of radial facetts.<!--</dd>---> | |
<dt><code>Facetted_Egg_Shape (Quarter_Segments, Radial_Segments, Lower_Scale, Upper_Scale)</code><!--</dt>---> | <dt><code>Facetted_Egg_Shape (Quarter_Segments, Radial_Segments, Lower_Scale, Upper_Scale)</code><!--</dt>---> | ||
| − | + | <dd>A facetted egg shape. The number of facetts are defined analog to <code>Facetted_Egg_Shape()</code>.<br> | |
| − | + | Equitorial incircle radius = 1. Lower half scaled in y by <code>Lower_Scale</code>, | |
| − | + | Upper half scaled in y by <code>Upper_Scale</code>.<!--</dd>---> | |
| − | + | ||
| − | <dt><code>Facetted_Egg (N_Quarter_Segments, N_Radial_Segments) </code><!--</dt>---> | + | <dt><code>Facetted_Egg (N_Quarter_Segments, N_Radial_Segments)</code><!--</dt>---> |
| − | + | <dd>A facetted egg with total height = 2. Lower half scaled in y by 1.15, Upper half scaled in y by 1.55.<!--</dd>---> | |
</dl> | </dl> | ||
| − | Round shapes: | + | <p><strong>Round shapes:</strong></p> |
<dl> | <dl> | ||
<dt><code>Egg_Shape (Lower_Scale, Upper_Scale)</code><!--</dt>---> | <dt><code>Egg_Shape (Lower_Scale, Upper_Scale)</code><!--</dt>---> | ||
| − | + | <dd>An egg shape with equitorial radius 1. <br> | |
| − | + | Lower half scaled in y by <code>Lower_Scale</code>, | |
| − | + | Upper half scaled in y by <code>Upper_Scale</code>.<!--</dd>---> | |
<dt><code>Egg</code><!--</dt>---> | <dt><code>Egg</code><!--</dt>---> | ||
| − | + | <dd>Uses the macro Egg_Shape.<br> | |
| − | + | Lower half scaled in y by 1.15, upper half scaled in y by 1.55.<!--</dd>---> | |
</dl> | </dl> | ||
Wireframe shape (mostly also optionally filled: | Wireframe shape (mostly also optionally filled: | ||
<dl> | <dl> | ||
<dt><code>Ring_Sphere (Rmaj_H, Rmaj_V, Rmin_H, Rmin_V, Number_of_Rings_horizontal, Number_of_Rings_vertical)</code><!--</dt>---> | <dt><code>Ring_Sphere (Rmaj_H, Rmaj_V, Rmin_H, Rmin_V, Number_of_Rings_horizontal, Number_of_Rings_vertical)</code><!--</dt>---> | ||
| − | + | <dd>A wireframe sphere by vertical and horizontal torii. <br> | |
| − | + | Horizontal tori: equatorial radius major <code>Rmaj_H</code>, radius minor <code>Rmin_H</code>.<br> | |
| − | + | Vertical tori: radius major <code>Rmaj_V</code>, radius minor <code>Rmin_V</code>.<!--</dd>---> | |
| − | <dt><code>Round_Pyramid_N_out (N, A, CornerR_out_A, B, CornerR_out_B, R_Border, Filled, Merge ) </code><!--</dt>---> | + | <dt><code>Round_Pyramid_N_out (N, A, CornerR_out_A, B, CornerR_out_B, R_Border, Filled, Merge )</code><!--</dt>---> |
| − | + | <dd>A regular n-sided column from point <code>A</code> to point <code>B</code>, | |
| − | + | defined by the outcircle radii: | |
| − | + | <code>R_in_A</code> at point <code>A</code> and <code>R_in_B</code> at point <code>B</code>.<!--</dd>---> | |
<dt><code>Round_Pyramid_N_in (N, A, FaceR_in_A, B, FaceR_in_B, R_Border, Filled, Merge_On )</code><!--</dt>---> | <dt><code>Round_Pyramid_N_in (N, A, FaceR_in_A, B, FaceR_in_B, R_Border, Filled, Merge_On )</code><!--</dt>---> | ||
| − | + | <dd>A regular n-sided column from point <code>A</code> to point <code>B</code>, | |
| − | + | defined by the incircle radii: | |
| − | + | <code>R_in_A</code> at point <code>A</code> and <code>R_in_B</code> at point <code>B</code>..<!--</dd>---> | |
<dt><code>Round_Cylinder_Tube( A, B, R_out, R_border, Filled, Merge)</code><!--</dt>---> | <dt><code>Round_Cylinder_Tube( A, B, R_out, R_border, Filled, Merge)</code><!--</dt>---> | ||
| − | + | <dd>A cylindrical tube from point <code>A</code> to point <code>B</code>, | |
| − | + | with the outer radius <code>R_out</code> and the border radius <code>R_border</code>. | |
| − | + | The inner radius is <code>R_out - R_border</code>.<br> | |
| − | + | With <code>Filled</code> = 1 we get a <code>Round_Cylinder</code>.<!--</dd>---> | |
<dt><code>Rounded_Tube( R_out, R_in, R_Border, Height, Merge)</code><!--</dt>---> | <dt><code>Rounded_Tube( R_out, R_in, R_Border, Height, Merge)</code><!--</dt>---> | ||
| − | + | <dd>A cylindrical tube around the y axis with the <code>Height</code> in y, with the outer radius <code>R_out</code>, the inner radius <code>R_in</code> and the radius of the rounded borders <code>R_border</code>.<!--</dd>---> | |
| − | |||
<dt><code>Rounded_Tube_AB( A, B, R_out, R_in, R_Border, Merge)</code><!--</dt>---> | <dt><code>Rounded_Tube_AB( A, B, R_out, R_in, R_Border, Merge)</code><!--</dt>---> | ||
| − | + | <dd>A cylindrical tube from point <code>A</code> to point <code>B</code>.<br> | |
| − | + | The outer radius is <code>R_out</code>, the inner radius is <code>R_in</code> | |
| − | + | and the radius of the rounded borders is <code>R_border</code>.<!--</dd>---> | |
<dt><code>Round_Conic_Torus( Center_Distance, R_upper, R_lower, R_border, Merge)</code><!--</dt>---> | <dt><code>Round_Conic_Torus( Center_Distance, R_upper, R_lower, R_border, Merge)</code><!--</dt>---> | ||
| − | + | <dd>A toroid ring the z axis, | |
| − | + | with the lower torus part at y = 0 and the upper part at y = Center_Distance.<br> | |
| − | + | The radius of the lower part is <code>R_lower</code>, | |
| − | + | the radius of the lower part is <code>R_lower</code> | |
| − | + | The minor radius of the toroid is <code>R_border</code>.<!--</dd>---> | |
| + | |||
<dt><code>Round_Conic_Prism( Center_Distance, R_upper, R_lower, Length_Zminus, R_Border, Merge)</code><!--</dt>---> | <dt><code>Round_Conic_Prism( Center_Distance, R_upper, R_lower, Length_Zminus, R_Border, Merge)</code><!--</dt>---> | ||
| − | + | <dd>A shape of the toroidal form like <code>Round_Conic_Torus()</code>, | |
| − | + | but filled and in the negativ z direction with the length <code> Length_Zminus</code>.<!--</dd>---> | |
| + | |||
<dt><code>Half_Hollowed_Rounded_Cylinder1( Length, R_out, R_border, BorderScale, Merge)</code><!--</dt>---> | <dt><code>Half_Hollowed_Rounded_Cylinder1( Length, R_out, R_border, BorderScale, Merge)</code><!--</dt>---> | ||
| − | + | <dd>A hollowed half rounded cylinder with the <code>Length</code> in x, of the outer radius <code>R_out</code>, with round ends. | |
| − | + | The borders have a minor radius <code>R_border</code> with the scale in y <code>BorderScale</code>.<br> | |
| − | + | The inner radius is <code>R_out - R_border</code>.<!--</dd>---> | |
<dt><code>Half_Hollowed_Rounded_Cylinder2( Length, R_out, R_corner, R_border, BorderScale, Merge)</code><!--</dt>---> | <dt><code>Half_Hollowed_Rounded_Cylinder2( Length, R_out, R_corner, R_border, BorderScale, Merge)</code><!--</dt>---> | ||
| − | + | <dd>A hollowed half rounded cylinder with the <code>Length</code> in x, of the outer radius <code>R_out</code>, with flat ends. | |
| − | + | The corners have a minor radius of <code>R_corner</code>, | |
| − | + | the borders have a minor radius of <code>R_border</code> with the scale in y <code>BorderScale</code>.<br> | |
| − | + | The inner radius is <code>R_out - R_border</code>, the inner lenght is <code>Length - 2*R_border</code>.<!--</dd>---> | |
| + | |||
<dt><code>Round_N_Tube_Polygon (N, Tube_R, R_incircle, Edge_R, Filled, Merge)</code><!--</dt>---> | <dt><code>Round_N_Tube_Polygon (N, Tube_R, R_incircle, Edge_R, Filled, Merge)</code><!--</dt>---> | ||
| − | + | <dd>A regular polygon with <code>N</code> edges (or corners) with incircle radius <code>R_incircle</code>, | |
| − | + | formed by a tube with the minor radius <code>Tube_R</code>. | |
| − | + | The corners are formed by torus segments with the major radius <code>Edge_R</code>.<!--</dd>---> | |
</dl> | </dl> | ||
Latest revision as of 13:43, 10 June 2017
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.Heightis the height in y direction. Column_N_AB (N, A, B, R_in)- A regular n-sided column from point
Ato 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_1at y = 0 andR_in_2at y =Height. Pyramid_N_AB(N, A, R_in_A, B, R_in_B)- A regular n-sided column from point
Ato pointB, defined by the incircle radii:
R_in_Aat pointAandR_in_Bat 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
Ato pointB, defined by the outcircle radii:R_in_Aat pointAandR_in_Bat 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
Ato pointB, defined by the incircle radii:R_in_Aat pointAandR_in_Bat pointB.. Round_Cylinder_Tube( A, B, R_out, R_border, Filled, Merge)- A cylindrical tube from point
Ato pointB, with the outer radiusR_outand 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
Heightin y, with the outer radiusR_out, the inner radiusR_inand the radius of the rounded bordersR_border. Rounded_Tube_AB( A, B, R_out, R_in, R_Border, Merge)- A cylindrical tube from point
Ato pointB.
The outer radius isR_out, the inner radius isR_inand 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_lowerThe 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
Lengthin x, of the outer radiusR_out, with round ends. The borders have a minor radiusR_borderwith 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
Lengthin x, of the outer radiusR_out, with flat ends. The corners have a minor radius ofR_corner, the borders have a minor radius ofR_borderwith 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
Nedges (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 radiusEdge_R.