POV-Ray : Newsgroups : povray.unofficial.patches : Using trace Server Time
8 Jul 2024 16:37:46 EDT (-0400)
  Using trace (Message 1 to 5 of 5)  
From: Andrea Ryan
Subject: Using trace
Date: 20 Jul 2001 23:01:07
Message: <3B58EC6D.EFD74540@global2000.net>
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

From: Jaime Vives Piqueres
Subject: Re: Using trace
Date: 21 Jul 2001 04:03:44
Message: <3B593754.D1C80747@ignorancia.org>

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

From: Rune
Subject: Re: Using trace
Date: 21 Jul 2001 06:40:37
Message: <3b595c25@news.povray.org>
"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

From: Andrea Ryan
Subject: Re: Using trace
Date: 22 Jul 2001 22:52:45
Message: <3B5B8D6C.16E794F6@global2000.net>
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

From: Andrea Ryan
Subject: Re: Using trace
Date: 22 Jul 2001 22:56:23
Message: <3B5B8E46.DBAE87BD@global2000.net>
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

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