|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|