POV-Ray : Newsgroups : povray.newusers : making a a-symetrical roof : Re: making a a-symetrical roof Server Time
29 Jul 2024 06:23:21 EDT (-0400)
  Re: making a a-symetrical roof  
From: Charles C
Date: 16 Jul 2006 12:15:00
Message: <web.44ba6595d56302e3b160ffde0@news.povray.org>
Hmmmmm, asymetrical huh....  The simplest thing would probably be to just
use a couple of triangles per side of the roof.  That's good if you're
wanting to apply an image map to a flat surface.  Or you could do the trig
to get the correct angles and such from the height and position of the
apex.  Look up float functions in the docs if you haven't already....
Then you can still do your whole-roof CSG if you want to, but you aren't
stuck with it.  E.g. then you could use a union of a few boxes or cylinders
to make different types of tiles and whatnot in #while loops to build a
flap, and then swing that "flap" down to the correct angle for that side of
the roof.
Charles


"joost_1972" <joo### [at] hotmailcom> wrote:
> "Charles C" <nomail@nomail> wrote:
> > Write your roof code with variable names in place of the hard numbers....
> > Then put it in a #macro like:
> >
> > #macro (Roof_Height, Roof_Width, Roof_Type, More_Parameters_etc)
> > // roof building code here
> > #end
> >
> > Although I bet somebody around here has some macros for this already...  It
> > just depends on whether you want to write your own.
> >
> Thanks! The macro is just what I needed for my mutiple roofs (pffew, I was
> afraid I had to give up my social life to create al my roofs. Maybe I
> should try to learn POV-Ray the old fashioned way: first read the whole
> tutorial and then start building my scene ......)
>
> I am still stuck with my own complex roof building code (using a box and
> subtracting four rotated boxes of the different sides). Do you (or anybody
> else reading this message) know if there is a better way of building a
> roof? (using prism's didn't work for me, because the sweeps are all
> symetrical, and I need an a-symetrical roof).
>
> Thanks again, Joost


Post a reply to this message

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