Pumpkin MacroThe 'Pumpkin()' macro generates an object to represent a pumpkin and optionally cuts eye, nose and mouth holes to create a traditional Halloween lantern. The macro is controlled using control variables and has no parameters. The pumpkin is constructed using Constructive Solid Geometry (CSG) to assemble primitive POV-Ray objects. The main shape consists of a set of a segments rotated around an axis to give a the segmented look. A lighter orange coloured sphere is then cut out from the centre and a variety of light orange coloured holes are poked through to make eyes, nose and mouth. Textures and settings have default values, but can be overridden using control variables as listed below. A sample scene file is included with the include file to illustrate the use of the macro and its control variables.
By default the macro places two lights inside each pumpkin. One is a bright light close to the bottom of the inside surface, this is about where a candle would be. The other is a spotlight shining down on the first just to make the candle area glow a bit more.
|Pumpkin_Segments||Typically between 12 and 24||The number of segments used to create a complete pumpkin. Default is 19.|
|Pumpkin_SegmentType||"Blob" or "Sphere"||Blob is more realistic but takes longer to render (a couple of minutes). Sphere is quicker to render (seconds rather than minutes). Hint: You can easily use "Sphere" in test renders and switch to "Blob" for a final render. Default is "Sphere"|
|Pumpkin_SegmentPerturbation||0 to 1||0=Not very perturbed, 1=Very perturbed, 2=Deformed. Default is 1.|
|Pumpkin_StalkOn||0 or 1||0=No Stalk, 1=With Stalk. Default is to add a stalk.|
|Pumpkin_FaceHolesOn||0 or 1||0=No Holes, 1=With Holes. Default is to cut holes using the content of 'Pumpkin_FaceHoles'.|
|Pumpkin_LightsOn||0 or 1||Add interior lights|
|Pumpkin_Seed||Positive Integer||Randomisation seed used only with Pumpkin_SegmentType="Blob". This makes successive pumpkins take on a different shape. To make a set of pumpkins all the same shape you can assign the results of the macro call to a variable and use it many times or you can reset the Pumpkin_Seed to the same value before each call to the macro (e.g. if you want the same shape with a different texture, etc.).|
|Pumpkin_ExternalTexture||Texture Definition||A texture definition for the external surface of the pumpkin.|
|Pumpkin_InternalTexture||Texture Definition||A texture definition for the internal surfaces of the pumpkin.|
|Pumpkin_FaceHoles||CSG Compatible Object||A union of objects that will be used to cut holes to represent a face. Objects reaching from z=-1 to z=0, positioned between about x=-0.3 and x=0.3 and y=-0.3 and y=0.3 should cut holes through the front surface of the pumpkin.|