Difference between revisions of "Reference:Lemon"

From POV-Wiki
Jump to navigation Jump to search
m (more grammar corrections)
m (suggested changes)
Line 6: Line 6:
 
     <p>{{New}} to version 3.7.1 the <code>lemon</code> object has been added. It is similar to the <code>cone</code> in that it's basically described the same way but with these differences:</p>
 
     <p>{{New}} to version 3.7.1 the <code>lemon</code> object has been added. It is similar to the <code>cone</code> in that it's basically described the same way but with these differences:</p>
 
     <ul>
 
     <ul>
       <li>end points are connected by a spherically curved <em>Inner_Radius</em></li>
+
       <li>end points are connected along their axis via the revolution surface that's generated by the circular arc of the <em>Inner_Radius</em></li>
       <li>generally speaking <em>Inner_Radius</em> <strong>must be</strong> greater than or equal to half the distance between end points</li>
+
       <li>minimal <em>Inner_Radius</em> is a spherical segment where the center of the arc lies on the end points axis</li>
 +
      <li>with larger values for <em>Inner_Radius</em> the surface is the inner part of a self intersecting torus or [https://en.wikipedia.org/wiki/Frustum frustum]</li>
 +
      <li>if the given <em>Inner_Radius</em> is too small the minimal value is used instead and a warning is issued</li>
 
       <li>minimal <em>Inner_Radius</em> is defined as sqrt (radius<sup>2</sup> + (distance/2)<sup>2</sup>)</li>
 
       <li>minimal <em>Inner_Radius</em> is defined as sqrt (radius<sup>2</sup> + (distance/2)<sup>2</sup>)</li>
      <li>if the given <em>Inner_Radius</em> is too small the minimal value as defined above is used instead and a warning is issued</li>
 
 
       <li><em>both</em> or <em>either</em> of the end points radii can be zero</li>
 
       <li><em>both</em> or <em>either</em> of the end points radii can be zero</li>
      <li>coded constraints on minimal <em>Inner_Radius</em> or when the end points radii are different can have adverse consequences</li>
 
 
     </ul>
 
     </ul>
 
   </td>
 
   </td>
 
   <td>
 
   <td>
     [[Image:LeForgeronLemon.png|center|240px<!--centered--->]]
+
     [[Image:LeForgeronLemon.png|center|215px<!--centered--->]]
 
   </td>
 
   </td>
 
</tr>
 
</tr>

Revision as of 12:34, 17 September 2016

New to version 3.7.1 the lemon object has been added. It is similar to the cone in that it's basically described the same way but with these differences:

  • end points are connected along their axis via the revolution surface that's generated by the circular arc of the Inner_Radius
  • minimal Inner_Radius is a spherical segment where the center of the arc lies on the end points axis
  • with larger values for Inner_Radius the surface is the inner part of a self intersecting torus or frustum
  • if the given Inner_Radius is too small the minimal value is used instead and a warning is issued
  • minimal Inner_Radius is defined as sqrt (radius2 + (distance/2)2)
  • both or either of the end points radii can be zero
LeForgeronLemon.png

example lemon objects

The syntax is as follows:

lemon { 
    <Base_Point>, Base_Radius, <Cap_Point>, Cap_Radius, Inner_Radius
    [LEMON_MODIFIERS]
  }

LEMON_MODIFIERS:
  sturm | open | OBJECT_MODIFIER

The following example produced the above image:

#version 3.7.1;
global_settings { assumed_gamma 1.0 }

camera { location -560*z
         direction z
         up y
         right image_width*x/image_height
         angle 5
       }

#include "colors.inc"

lemon { -18*y-10*x, 0, 18*y-10*x, 0, 30 texture { pigment { color CH2RGB(30) filter 0.45 } } }
lemon { +10*x+1*y, 5, 18*y+10*x, 0, 15 texture { pigment { color CH2RGB(100) filter 0.45 } } }
lemon { -1*y+10*x, 5, -18*y+10*x, 5, 15 texture { pigment { color CH2RGB(150) filter 0.45 } } }

box { 10*z-20*x-20*y, 10*z+20*x+20*y texture { pigment { color White }}}

light_source { 10*<0,0,-20>, 0.9 }
light_source { 10*<-5,10,-50>, 0.9 }
light_source { 10*<-10,10,-50>, 0.9 }
light_source { 10*<5,10,-50>, 0.9 }
light_source { 10*<10,10,-50>, 0.9 }

If additional accuracy is required you can add the sturm object modifier.

See also the cone object.