POV-Ray : Newsgroups : povray.newusers : How to create scene component library? : Re: How to create scene component library? Server Time
28 Jul 2024 20:30:31 EDT (-0400)
  Re: How to create scene component library?  
From: Alain
Date: 17 Aug 2007 19:03:16
Message: <46c62934$1@news.povray.org>
Marty Schrader nous apporta ses lumieres en ce 2007/08/17 18:04:
> Okay, this is the kind of thing I am trying to sort out. If, for 
> instance, I want to make a nose cone component, how do I specify the 
> creation of that shape without any reference to whatever other parts may 
> be there in the scene already? How do I go about creating macros or 
> whatever so that individual parts can be included or not without 
> affecting other components?
You create the macro to take radius and lenght as parameters, with, optionaly an 
offset value to raise it to some elevation. A reducer/expander will take 2 
radius and a lenght: Bottom_Radius, Top_Radius, Lenght.
It's then a simple mather of summing the various lenght of the preceding parts 
to calculate the amount of translation to apply to the next part.

You simply call the macro with parameters setting the base diameter and lenght 
of the one element you want to show. You can then translate/rotate that object 
as you wish.

If you use an image_map to add a texture, or use a texture like checkers, you 
should use warp{cylindrical} to map that texture on the basicaly cylindrical 
part. Take a look to the documentation for the use of warp.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you have ever said "I don't need 
no steenking modellers!!!"
Stephan Ahonen


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.