|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
When I try to use trace to place a tower from one of my include files
onto a heightfield island, I don't see the tower. I put the tower onto
a plane representing water and It looked big enough to see over any part
of the island that might block it from view. Am I using trace right?
There is a picture in p.b.i.
Brendan
#declare xtrans = 500; //where the tower goes
#declare ztrans = 0;
#declare Start = <xtrans,10000,ztrans>; //trace to find y value for
tower
#declare Inter =
trace ( Island, Start, <xtrans,-10000,ztrans>);
object { tower translate <xtrans,0,ztrans>+Inter*y } //put tower there
cylinder { 0,<0,1000,0>,1 pigment { color rgb <0,0,1> } translate
<xtrans,0,ztrans> } //shows where tower is
camera { location <1500,800,-917> look_at Inter/*+xtrans*x+ztrans*z*/ }
//camera { location <xtrans,10000,ztrans> look_at <xtrans,0,ztrans> }
//camera { location <xtrans,400,ztrans> look_at
<xtrans,0,ztrans>+Inter*y translate <0,0,10> }
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>
> When I try to use trace to place a tower from one of my include files
> onto a heightfield island, I don't see the tower. I put the tower onto
> a plane representing water and It looked big enough to see over any part
> of the island that might block it from view. Am I using trace right?
> There is a picture in p.b.i.
At first look it seems correct to me. Why not try "debug" to print out
the actual value of Inter.y? That could help you to figure where the
tower is going...
--
Jaime Vives Piqueres
La Persistencia de la Ignorancia
http://www.ignorancia.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Andrea Ryan" wrote:
> #declare Start = <xtrans,10000,ztrans>;
> #declare Inter =
> trace ( Island, Start, <xtrans,-10000,ztrans>);
>
> object { tower translate <xtrans,0,ztrans>+Inter*y }
The third parameter in trace is a direction, not a point.
Try the following (not tested):
> #declare Start = <xtrans,10000,ztrans>;
> #declare Inter =
> trace ( Island, Start, -y);
>
> object { tower translate Inter }
Hope that helps!
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
With my original trace, it put the tower at zero distance above the
water plane. So, it was hidden under the heightfield. Changing the
third argument of trace to -y worked. I used str to convert the float
Inter.y to a string that #debug can output. Thanks.
Brendan
> At first look it seems correct to me. Why not try "debug" to print out
> the actual value of Inter.y? That could help you to figure where the
> tower is going...
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rune wrote:
>
> "Andrea Ryan" wrote:
> > #declare Start = <xtrans,10000,ztrans>;
> > #declare Inter =
> > trace ( Island, Start, <xtrans,-10000,ztrans>); <--- I thought that it would go
toward this point.
But it's a vector and they have a initial point which is Start, and a
direction, which should be -y as you suggested.
> >
> > object { tower translate <xtrans,0,ztrans>+Inter*y }
>
> The third parameter in trace is a direction, not a point.
>
> Try the following (not tested):
>
> > #declare Start = <xtrans,10000,ztrans>;
> > #declare Inter =
> > trace ( Island, Start, -y); <--- This worked.
> >
> > object { tower translate Inter }
>
> Hope that helps!
>
Yes, it worked. Thank you. Time to move the tower around and add some
textures to it...
Brendan
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|