POV-Ray : Newsgroups : povray.binaries.images : INVITATION: Join the Mississippi Paddle-Wheel Steamer! Server Time
7 May 2024 03:43:34 EDT (-0400)
  INVITATION: Join the Mississippi Paddle-Wheel Steamer! (Message 21 to 30 of 73)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Alain
Subject: Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer!
Date: 27 Mar 2018 15:03:43
Message: <5aba958f$1@news.povray.org>
Le 18-03-27 à 05:28, Sven Littkowski a écrit :
> Thanks. I heard about that function, but have problems to handle it.
> 
> But never mind, I have all coordinates of the entire scene in my mind. I
> find it difficult to learn to work with so-called WYSIWYG editors, I
> hand-code everything. :-)
> 
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
> 

You mostly need to remenber that trace(object, start, direction) use a 
start location and a direction. If you change the last value, you'll 
trace in different directions.

trace(Deck, <PosX, 1000, PosZ>, -y)


Post a reply to this message

From: Stephen
Subject: Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer!
Date: 27 Mar 2018 16:33:11
Message: <5abaaa87$1@news.povray.org>
On 27/03/2018 20:04, Alain wrote:
> Le 18-03-27 à 05:28, Sven Littkowski a écrit :
>> Thanks. I heard about that function, but have problems to handle it.
>>
>> But never mind, I have all coordinates of the entire scene in my mind. I
>> find it difficult to learn to work with so-called WYSIWYG editors, I
>> hand-code everything. :-)
>>
>> ---
>> Diese E-Mail wurde von AVG auf Viren geprüft.
>> http://www.avg.com
>>
> 
> You mostly need to remenber that trace(object, start, direction) use a 
> start location and a direction. If you change the last value, you'll 
> trace in different directions.
> 
> trace(Deck, <PosX, 1000, PosZ>, -y)


Even I can use it. ;-)

Use PosX, PosZ to describe a grid with a loop. And check that
   (vlength (Norm)!=0) and do some stuff


Hmm! I had an extra variable:

#declare Inter = trace (Trace_object_,< Pos_x, Pos_y, Pos_z >, z, Norm);

#if (vlength (Norm)!=0)


Then do some stuff.

#end


Alain probably knows and uses a more efficient way of coding it than I 
do/can.


-- 

Regards
     Stephen


Post a reply to this message

From: Sven Littkowski
Subject: Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer!
Date: 27 Mar 2018 23:30:34
Message: <5abb0c5a$1@news.povray.org>
Thanks Alain and Stephen.   :-)

The item is what is to be checked for (like the name of a Declare union,
I would assume).

The first coordinate is from where the search ray is starting?

The second coordinate is towards which direction (destination) the
search ray is heading?

Norm contains the coordinates of a hit?


---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Stephen
Subject: Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer!
Date: 28 Mar 2018 02:06:55
Message: <5abb30ff$1@news.povray.org>
On 28/03/2018 04:30, Sven Littkowski wrote:
> Thanks Alain and Stephen.   :-)
> 
> The item is what is to be checked for (like the name of a Declare union,
> I would assume).
> 
> The first coordinate is from where the search ray is starting?
> 
> The second coordinate is towards which direction (destination) the
> search ray is heading?
> 
> Norm contains the coordinates of a hit?
> 
> 

I think that it a good idea to quote the bit of code that you are 
talking about.
Norm is the vector of the normal if the trace ray hits the target. So we 
test to see if the vector is not zero. That means we have a hit. If Norm 
is zero then the ray missed.

I have an test scene from when I was learning to use trace() that is 
self contained. Firing arrows at a mesh target. A study for Saint 
Sebastian. I will post it after cleaning up the Bishop3D workarounds.



-- 

Regards
     Stephen


Post a reply to this message

From: Sven Littkowski
Subject: Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer!
Date: 28 Mar 2018 09:07:35
Message: <5abb9397$1@news.povray.org>
I once had Bishop 3D, too. In fact, I was been one of the beta testers,
and thus got the unlock code free of cost.

But then, my hard drive crashed, and I lost all programs and e-mails.
Now I cannot find the Brazilian developer anymore to ask him to re-issue
me my unlock code. I am not joking, I was really one of the beta testers.

Bishop 3D is a great software. Just it doesn't like functions. But all
the shapes - it can handle them very well!

---------------------

Thanks for your TRACE help! :-D

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Stephen
Subject: Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer!
Date: 28 Mar 2018 09:51:37
Message: <5abb9de9$1@news.povray.org>
On 28/03/2018 14:07, Sven Littkowski wrote:
> I once had Bishop 3D, too. In fact, I was been one of the beta testers,
> and thus got the unlock code free of cost.
> 
> But then, my hard drive crashed, and I lost all programs and e-mails.
> Now I cannot find the Brazilian developer anymore to ask him to re-issue
> me my unlock code. I am not joking, I was really one of the beta testers.
> 

I remember. You were building an underwater base.
Actually if you go back on the website. You will find a registration key 
as Hugo made it freeware.
Drat! The site has gone but you can get it via the wayback machine.

https://web.archive.org/web/20160122202116/http://bishop3d.com/download.htm



> Bishop 3D is a great software. Just it doesn't like functions. But all
> the shapes - it can handle them very well!
> 

StephenS developed quite a few techniques for workarounds by using the 
Raw Code plugin. We even managed to get screen.inc to work in B3D


-
> 
> Thanks for your TRACE help! :-D
> 
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
> 


-- 

Regards
     Stephen


Post a reply to this message

From: Sven Littkowski
Subject: Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer!
Date: 28 Mar 2018 14:02:09
Message: <5abbd8a1$1@news.povray.org>
Wow, I did not knew about these "latest" developments! You can see,
since how long I lost touch. Sad and good news in one.

I registered the software now, after all these years, thanks to you. :-)

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Alain
Subject: Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer!
Date: 28 Mar 2018 19:19:45
Message: <5abc2311$1@news.povray.org>
Le 18-03-27 à 16:33, Stephen a écrit :
> On 27/03/2018 20:04, Alain wrote:
>> Le 18-03-27 à 05:28, Sven Littkowski a écrit :
>>> Thanks. I heard about that function, but have problems to handle it.
>>>
>>> But never mind, I have all coordinates of the entire scene in my mind. I
>>> find it difficult to learn to work with so-called WYSIWYG editors, I
>>> hand-code everything. :-)
>>>
>>> ---
>>> Diese E-Mail wurde von AVG auf Viren geprüft.
>>> http://www.avg.com
>>>
>>
>> You mostly need to remenber that trace(object, start, direction) use a 
>> start location and a direction. If you change the last value, you'll 
>> trace in different directions.
>>
>> trace(Deck, <PosX, 1000, PosZ>, -y)
> 
> 
> Even I can use it. ;-)
> 
> Use PosX, PosZ to describe a grid with a loop. And check that
>    (vlength (Norm)!=0) and do some stuff
> 
> 
> Hmm! I had an extra variable:
> 
> #declare Inter = trace (Trace_object_,< Pos_x, Pos_y, Pos_z >, z, Norm);
> 
> #if (vlength (Norm)!=0)
> 
> 
> Then do some stuff.
> 
> #end
> 
> 
> Alain probably knows and uses a more efficient way of coding it than I 
> do/can.
> 
> 

If you can be reasonably sure that all your start points are over the 
target object, then, you can omit the normal parameter.
But, yes, taking the normal into account is normally preferable.


Post a reply to this message

From: Alain
Subject: Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer!
Date: 28 Mar 2018 19:30:49
Message: <5abc25a9$1@news.povray.org>
Le 18-03-27 à 23:30, Sven Littkowski a écrit :
> Thanks Alain and Stephen.   :-)
> 
> The item is what is to be checked for (like the name of a Declare union,
> I would assume).
> 
> The first coordinate is from where the search ray is starting?
> 
> The second coordinate is towards which direction (destination) the
> search ray is heading?
> 
> Norm contains the coordinates of a hit?
> 
> 
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
> 

The correct way to use trace with an arbitrary, oddly shaped, target 
object is :
#declare Normal =<0,0,0>;
#declare SurfacePoint= trace(<PosX, 1000, PosZ>, -y, Normal);
#if(vlength(Normal))
	...do your stuff...
#end

"SurfacePoint" will contain the location of the point directly under 
<PosX,1000,PosZ>, or <0,0,0> it the trace miss the object. As a 
legitimate point may be at that location, this is not a reliable way to 
know if the trace hit or not.
"SurfacePoint" contain the location that interest you.

If the trace miss the target object, Normal have a zero length. If it 
find the object, Normal contain the normal of the surface at that point 
as an a unit length vector.


Alain


Post a reply to this message

From: Stephen
Subject: Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer!
Date: 28 Mar 2018 23:06:13
Message: <5abc5825@news.povray.org>
On 29/03/2018 00:19, Alain wrote:
> Le 18-03-27 à 16:33, Stephen a écrit :
>> On 27/03/2018 20:04, Alain wrote:
>>> Le 18-03-27 à 05:28, Sven Littkowski a écrit :
>>>> Thanks. I heard about that function, but have problems to handle it.
>>>>
>>>> But never mind, I have all coordinates of the entire scene in my 
>>>> mind. I
>>>> find it difficult to learn to work with so-called WYSIWYG editors, I
>>>> hand-code everything. :-)
>>>>
>>>> ---
>>>> Diese E-Mail wurde von AVG auf Viren geprüft.
>>>> http://www.avg.com
>>>>
>>>
>>> You mostly need to remenber that trace(object, start, direction) use 
>>> a start location and a direction. If you change the last value, 
>>> you'll trace in different directions.
>>>
>>> trace(Deck, <PosX, 1000, PosZ>, -y)
>>
>>
>> Even I can use it. ;-)
>>
>> Use PosX, PosZ to describe a grid with a loop. And check that
>>    (vlength (Norm)!=0) and do some stuff
>>
>>
>> Hmm! I had an extra variable:
>>
>> #declare Inter = trace (Trace_object_,< Pos_x, Pos_y, Pos_z >, z, Norm);
>>
>> #if (vlength (Norm)!=0)
>>
>>
>> Then do some stuff.
>>
>> #end
>>
>>
>> Alain probably knows and uses a more efficient way of coding it than I 
>> do/can.
>>
>>
> 
> If you can be reasonably sure that all your start points are over the 
> target object, then, you can omit the normal parameter.
> But, yes, taking the normal into account is normally preferable.


Thanks for the tip. :-D

-- 

Regards
     Stephen


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.