POV-Ray : Newsgroups : povray.general : While we are talking about changes Server Time
10 Aug 2024 09:18:33 EDT (-0400)
  While we are talking about changes (Message 27 to 36 of 46)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Ken
Subject: Re: While we are talking about changes
Date: 14 Mar 2000 19:22:43
Message: <38CED846.32BBF0E5@pacbell.net>
cre### [at] belialrenonvus wrote:
> Good!:) btw since we're kinda on the subject, how can I shorten the
> box {<-0.5,-0.5,-0.5>,<0.5,0.5,0.5> }

Some typical shorthand primitives:

box {<-0.5,-0.5,-0.5>,<0.5,0.5,0.5> }

box{-.5,.5) // a unit box at the origin


sphere {<0,0,0>,1 }

sphere{0,1) // a unit sphere at the origin


cylinder {<-.5, 0, 0>, <.5, 0, 0>, 1 }

cylinder{x*-.5,x*.5,1} // 1 unit long in the x direction with a dia of 1


cone {<0, -.5, 0>, 1, <0, .5, 0>, 0 }

cone{y*-.5,1,y*.5,0} // 1 unit high with a base of 1 and a point of zero
                     // centered at the origin



-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: crewman
Subject: Re: While we are talking about changes
Date: 14 Mar 2000 20:31:02
Message: <Pine.LNX.4.10.10003141653180.23088-100000@belial.reno.nv.us>
On Tue, 14 Mar 2000, Chris Huff wrote:

> In article 
> <Pin### [at] belialrenonvus>, 
> <cre### [at] belialrenonvus> wrote:
> 
> > Good!:) btw since we're kinda on the subject, how can I shorten the 
> > box {<-0.5,-0.5,-0.5>,<0.5,0.5,0.5> } 
> > 
> > see I always make my boxes that big then scale the suckers to 
> > whatever I'm doing, the thing is typing all those 0.5's can be tiring 
> > (I get around that with cut and paste, but still if there is some 
> > shortform...I'd love to know it :)
> 
> You could use this:
> #declare Box = box {<-0.5,-0.5,-0.5>,<0.5,0.5,0.5> }
> 
> And then make your boxes with
> object {Box
> ...
> }

Doh! I should have thought of that! :) 

 
> Or you can leave the 0's out:
> box {<-.5,-.5,-.5>,<.5,.5,.5> }
> And to shorten it further, you can use the feature of POV that promotes 
> floats to vectors when necessary:
> box {-0.5, 0.5}
> or
> box {-.5,.5}
>

Yeah...ok

> This isn't as easy to immediately understand, though, and is just as 
> long as using a Box variable.
> 
> 
> If you really want to eliminate keypresses, try this:
> #macro Box()
> box {<-.5,-.5,-.5>,<.5,.5,.5>
> #end
> 
> You would use the macro this way:
> 
> Box()
> ...object stuff, textures, etc go here...
> }
> 
> You could use a shorter name for the macro, but you can't eliminate the 
> parentheses.

Kewl.....sorta like #define eh? but without the object{} thing... Can I do
that for CSG stuff too? I use CSG a LOT (pages of the stuff) this could
save some typing :)  

 
> -- 
> Chris Huff
> e-mail: chr### [at] yahoocom
> Web page: http://chrishuff.dhs.org/
> 
>


Post a reply to this message

From: crewman
Subject: Re: While we are talking about changes
Date: 14 Mar 2000 20:34:32
Message: <Pine.LNX.4.10.10003141723060.23088-100000@belial.reno.nv.us>
On Tue, 14 Mar 2000, Ken wrote:

> 
> 
> cre### [at] belialrenonvus wrote:
> > Good!:) btw since we're kinda on the subject, how can I shorten the
> > box {<-0.5,-0.5,-0.5>,<0.5,0.5,0.5> }
> 
> Some typical shorthand primitives:
> 
> box {<-0.5,-0.5,-0.5>,<0.5,0.5,0.5> }
> 
> box{-.5,.5) // a unit box at the origin
> 
> 
> sphere {<0,0,0>,1 }
> 
> sphere{0,1) // a unit sphere at the origin
> 
> 
> cylinder {<-.5, 0, 0>, <.5, 0, 0>, 1 }
> 
> cylinder{x*-.5,x*.5,1} // 1 unit long in the x direction with a dia of 1
> 
> 
> cone {<0, -.5, 0>, 1, <0, .5, 0>, 0 }
> 
> cone{y*-.5,1,y*.5,0} // 1 unit high with a base of 1 and a point of zero
>                      // centered at the origin
> 

so y* = 1 ? (or x* = 1?) or is it y (multiplied by) ?





> 
> -- 
> Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
> http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
> 
>


Post a reply to this message

From: Glen Berry
Subject: Re: While we are talking about changes
Date: 14 Mar 2000 20:59:57
Message: <d+3OOOYLzvogwIMemnUDluXyUVic@4ax.com>
On Tue, 14 Mar 2000 17:22:43 -0800, <cre### [at] belialrenonvus> wrote:

>> You would use the macro this way:
>> 
>> Box()
<SNIP>
>Kewl.....sorta like #define eh? but without the object{} thing... Can I do
>that for CSG stuff too? I use CSG a LOT (pages of the stuff) this could
>save some typing :)  

You might save some typing, but keep in mind that it will take longer
to parse. This might not be a problem, unless you have several
elements in your scene described using macros.

Later,
Glen Berry


Post a reply to this message

From: Ken
Subject: Re: While we are talking about changes
Date: 14 Mar 2000 21:04:46
Message: <38CEF035.DA6CE8F6@pacbell.net>
cre### [at] belialrenonvus wrote:

> so y* = 1 ? (or x* = 1?) or is it y (multiplied by) ?

sphere{< 1,0, 0>, 1} = sphere{x, 1}

sphere{<-1,0, 0>, 1} = sphere{-x, 1}

sphere{< 1,1, 0>, 1} = sphere{x+y, 1}

sphere{<-1,1,-1>, 1} = sphere{-x+y+-z, 1}

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Alan Kong
Subject: Re: While we are talking about changes
Date: 14 Mar 2000 21:31:10
Message: <2bttcs8adcdpkhiu5ev192sth898isjab4@4ax.com>
On Tue, 14 Mar 2000 09:03:27 -0500 "Bill DeWitt"
<the### [at] earthlinknet> wrote:

>    I have almost convinced my family and friends that waving your hands in
>the air, staring into space and  even pounding one hand against your temple
>while apparently grasping at and manipulating something invisible with your
>eyes tightly shut is the way we communicate with the POVray Program Goddess.
>

  You are correct, Bill, but one can also go blind using that method
<g>.

-- 
Alan - ako### [at] povrayorg - a k o n g <at> p o v r a y <dot> o r g
http://www.povray.org - Home of the Persistence of Vision Ray Tracer


Post a reply to this message

From: Ron Parker
Subject: Re: While we are talking about changes
Date: 15 Mar 2000 08:09:31
Message: <38cf8b8b$1@news.povray.org>
On Tue, 14 Mar 2000 16:24:38 -0800, Ken wrote:
>sphere{0,1) // a unit sphere at the origin

That's not a unit sphere.  It's a sphere of unit radius.

-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

From: PoD
Subject: Re: While we are talking about changes
Date: 15 Mar 2000 16:28:42
Message: <38D007E5.B3C1CEB1@merlin.net.au>
cre### [at] belialrenonvus wrote:
> 
> On Tue, 14 Mar 2000, Ken wrote:
> 
> > cone{y*-.5,1,y*.5,0} // 1 unit high with a base of 1 and a point of zero
> >                      // centered at the origin
> >
> 
> so y* = 1 ? (or x* = 1?) or is it y (multiplied by) ?
> 

In POV speak
 y = <0,1,0>
so
 y*0.5 = <0,1,0>*0.5 = <0,0.5,0>
also .5 = 0.5

PoD.


Post a reply to this message

From: crewman
Subject: Re: While we are talking about changes
Date: 15 Mar 2000 19:27:55
Message: <Pine.LNX.4.10.10003151620180.23797-100000@belial.reno.nv.us>
On Tue, 14 Mar 2000, Ken wrote:

> 
> 
> cre### [at] belialrenonvus wrote:
> 
> > so y* = 1 ? (or x* = 1?) or is it y (multiplied by) ?
> 
> sphere{< 1,0, 0>, 1} = sphere{x, 1}
> 
> sphere{<-1,0, 0>, 1} = sphere{-x, 1}
> 
> sphere{< 1,1, 0>, 1} = sphere{x+y, 1}
> 
> sphere{<-1,1,-1>, 1} = sphere{-x+y+-z, 1}

Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ok :)


> 
> -- 
> Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
> http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
> 
>


Post a reply to this message

From: crewman
Subject: Re: While we are talking about changes
Date: 15 Mar 2000 19:30:33
Message: <Pine.LNX.4.10.10003151622230.23797-100000@belial.reno.nv.us>
On Thu, 16 Mar 2000, PoD wrote:

> cre### [at] belialrenonvus wrote:
> > 
> > On Tue, 14 Mar 2000, Ken wrote:
> > 
> > > cone{y*-.5,1,y*.5,0} // 1 unit high with a base of 1 and a point of zero
> > >                      // centered at the origin
> > >
> > 
> > so y* = 1 ? (or x* = 1?) or is it y (multiplied by) ?
> > 
> 
> In POV speak
>  y = <0,1,0>
> so
>  y*0.5 = <0,1,0>*0.5 = <0,0.5,0>
> also .5 = 0.5


gotcha! Once I use this a few times, it'll stick :) (grabs some crazy
glue...)

 
> PoD.
> 
>


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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