Difference between revisions of "Reference:Shapes3.inc"

From POV-Wiki
Jump to navigation Jump to search
m
 
(6 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:
 
 
 
<code>Segment_of_Torus ( R_major, R_minor, Segment_Angle )</code>  
 
 
 
      Segment of a torus around the y axis. The angle starts at positive x axis.
 
  
 +
<p><strong>Segments of shapes:</strong></p>
 
<dl>
 
<dl>
 +
<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>--->
+
<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>
+
<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>--->
+
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>.
+
<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>--->
        <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>,
+
<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>--->
            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,
+
<dd>A regular n-sided pyramid around the y axis, defined by the incircle radii:<br>
            defined by the incircle radii:
+
<code>R_in_1</code> at y = 0 and <code>R_in_2</code> at y = <code>Height</code>.<!--</dd>--->
            <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>,
+
<dd>A regular n-sided column from point <code>A</code> to point <code>B</code>,
            defined by the incircle radii:
+
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>--->
+
<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>
+
<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>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>--->
+
<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>
+
<dd>A facetted egg shape. The number of facetts are defined analog to <code>Facetted_Egg_Shape()</code>.<br>
            Equitorial incircle radius = 1.
+
Equitorial incircle radius = 1. Lower half scaled in y by <code>Lower_Scale</code>,
            Lower half scaled in y by <code>Lower_Scale</code>,
+
Upper half scaled in y by <code>Upper_Scale</code>.<!--</dd>--->
            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>--->
+
<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>
+
<dd>An egg shape with equitorial radius 1. <br>
            Lower half scaled in y by <code>Lower_Scale</code>,
+
Lower half scaled in y by <code>Lower_Scale</code>,
            Upper half scaled in y by <code>Upper_Scale</code>.<!--</dd>--->
+
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>
+
<dd>Uses the macro Egg_Shape.<br>
        Lower half scaled in y by 1.15, upper half scaled in y by 1.55.<!--</dt>--->
+
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>
+
<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>
+
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>--->
+
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>,
+
<dd>A regular n-sided column from point <code>A</code> to point <code>B</code>,
            defined by the outcircle radii:
+
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>--->
+
<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>,
+
<dd>A regular n-sided column from point <code>A</code> to point <code>B</code>,
            defined by the incircle radii:
+
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>--->
+
<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>,
+
<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>.
+
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>
+
The inner radius is <code>R_out - R_border</code>.<br>
            With <code>Filled</code> = 1 we get a <code>Round_Cylinder</code>.<!--</dd>--->
+
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>
+
<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>--->
            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>
+
<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>
+
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>--->
+
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,
+
<dd>A toroid ring the z axis,
        with the lower torus part at y = 0 and the upper part at y = Center_Distance. <br>
+
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 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>--->
+
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>,
+
<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>--->
+
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.
+
<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 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>--->
+
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.
+
<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 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 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>--->
+
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>,
+
<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>.
+
formed by a tube with the minor radius <code>Tube_R</code>.
            The corners are formed by torus segments with the major radius radius <code>Edge_R</code>.<!--</dd>--->
+
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. Height is the height in y direction.
Column_N_AB (N, A, B, R_in)
A regular n-sided column from point A to point B, defined by the incircle radius R_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 and R_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 point B, defined by the incircle radii:
R_in_A at point A and R_in_B at point B.

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 by Lower_Scale, Upper half scaled in y by Upper_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 by Lower_Scale, Upper half scaled in y by Upper_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 major Rmaj_H, radius minor Rmin_H.
Vertical tori: radius major Rmaj_V, radius minor Rmin_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 point B, defined by the outcircle radii: R_in_A at point A and R_in_B at point B.
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 point B, defined by the incircle radii: R_in_A at point A and R_in_B at point B..
Round_Cylinder_Tube( A, B, R_out, R_border, Filled, Merge)
A cylindrical tube from point A to point B, with the outer radius R_out and the border radius R_border. The inner radius is R_out - R_border.
With Filled = 1 we get a Round_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 radius R_out, the inner radius R_in and the radius of the rounded borders R_border.
Rounded_Tube_AB( A, B, R_out, R_in, R_Border, Merge)
A cylindrical tube from point A to point B.
The outer radius is R_out, the inner radius is R_in and the radius of the rounded borders is R_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 is R_lower, the radius of the lower part is R_lower The minor radius of the toroid is R_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 length Length_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 radius R_out, with round ends. The borders have a minor radius R_border with the scale in y BorderScale.
The inner radius is R_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 radius R_out, with flat ends. The corners have a minor radius of R_corner, the borders have a minor radius of R_border with the scale in y BorderScale.
The inner radius is R_out - R_border, the inner lenght is Length - 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 radius R_incircle, formed by a tube with the minor radius Tube_R. The corners are formed by torus segments with the major radius Edge_R.