POV-Ray : Newsgroups : povray.newusers : making a a-symetrical roof Server Time
1 Nov 2024 03:15:57 EDT (-0400)
  making a a-symetrical roof (Message 1 to 6 of 6)  
From: joost 1972
Subject: making a a-symetrical roof
Date: 15 Jul 2006 09:20:01
Message: <web.44b8ea336192215eef5b9f0a0@news.povray.org>
Hi. Is there a object tool in POV-Ray with which you can simply state the
corner points of an object and POV-ray creates it? I need to make a long
house roof with an off-centre top (base: <0,0,0>, <8,0,0>, <8,0,4> and
<0,0,4>, top <1,3,1> to <7,3,3>). I finaly managed one roof using different
objects and csg, but I need a lot of different roofs. If anyone can help me
with a simple way to contruct my roof, I would be very gratefull.
Thanks, Joost.
P.S. Since I started using POV-ray I have 3D objects entering my dreams at
night. Is this a normal side-effect?


Post a reply to this message

From: Charles C
Subject: Re: making a a-symetrical roof
Date: 15 Jul 2006 13:10:00
Message: <web.44b920b0d56302e33869c6770@news.povray.org>
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.


Charles

PS, Yes I think so...., or as a distraction from falling asleep.



"joost_1972" <joo### [at] hotmailcom> wrote:
> Hi. Is there a object tool in POV-Ray with which you can simply state the
> corner points of an object and POV-ray creates it? I need to make a long
> house roof with an off-centre top (base: <0,0,0>, <8,0,0>, <8,0,4> and
> <0,0,4>, top <1,3,1> to <7,3,3>). I finaly managed one roof using different
> objects and csg, but I need a lot of different roofs. If anyone can help me
> with a simple way to contruct my roof, I would be very gratefull.
> Thanks, Joost.
> P.S. Since I started using POV-ray I have 3D objects entering my dreams at
> night. Is this a normal side-effect?


Post a reply to this message

From: Alain
Subject: Re: making a a-symetrical roof
Date: 15 Jul 2006 13:53:43
Message: <44b92ba7@news.povray.org>
joost_1972 nous apporta ses lumieres en ce 15/07/2006 09:18:

> P.S. Since I started using POV-ray I have 3D objects entering my dreams at
> night. Is this a normal side-effect?
> 
> 
> 
> 
Yes, it's the first step.
Next, you'll start thinking how that texture is programmed, then you'll start looking
at common 
objects around you and see how they can be made with CSG, then with isosurfaces.

-- 
Alain
-------------------------------------------------
99 percent of lawyers give the rest a bad name.


Post a reply to this message

From: joost 1972
Subject: Re: making a a-symetrical roof
Date: 16 Jul 2006 08:00:01
Message: <web.44ba2838d56302e3ef5b9f0a0@news.povray.org>
"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

From: Charles C
Subject: Re: making a a-symetrical roof
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

From: joost 1972
Subject: Re: making a a-symetrical roof
Date: 16 Jul 2006 17:10:01
Message: <web.44baaa38d56302e3ef5b9f0a0@news.povray.org>
Using triangles in a mesh works out great for a roof (plus its a lot easier
to use with a macro than a csg). Thanks again. Greetz. Joost


Post a reply to this message

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