POV-Ray : Newsgroups : povray.advanced-users : Question! Server Time
30 Jul 2024 08:18:51 EDT (-0400)
  Question! (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Simen Kvaal
Subject: Re: Question!
Date: 25 Mar 2000 03:32:36
Message: <38dc79a4$1@news.povray.org>
Well, I didn't actually try it; I just assumed you knew what you ere doing.
(heh..) But I've tried it now, but
it doesn't seem to work. I noted that the Normal-vector had to be
initialized first, so I did that, and then I got
no errors. But a simple sphere of radius 1 floating 30 units above a
(checkered) plane, did not show up.

I really only need a way to place an object on a _given_ y-level, and thanks
to you, I think I know how now.

Simen.

Peter Popov skrev i meldingen ...
>On Fri, 24 Mar 2000 12:49:27 +0100, "Simen Kvaal"
><sim### [at] studentmatnatuiono> wrote:
>
>>Thanks! :D Works with isos too? (Haven't got the time to test it right
now!)
>>
>>Simen.
>
>You mean it ran the first time?!?!
>
>
>Peter Popov ICQ : 15002700
>Personal e-mail : pet### [at] usanet
>TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Chris Huff
Subject: Re: Question!
Date: 25 Mar 2000 08:35:46
Message: <chrishuff_99-0050B3.08375625032000@news.povray.org>
In article <XabaOGJ2TFw0Mrf=rUXtavRUQB6F@4ax.com>, Peter Popov 
<pet### [at] usanet> wrote:

...
> It *might* just work a prima vista but I doubt it as I typed it
> directly in the newsreader ;) Anyway, you get the idea.

This version seems to work fine, although I haven't heavily tested it 
yet. It returns the lowest point instead of positioning the object on a 
surface at y=0.

#macro FindLowestPoint(Object, Steps)
    #local MinExt = min_extent(Object);
    #local MaxExt = max_extent(Object);
    #local Size = MaxExt-MinExt;
    #local LowestPt = MaxExt;
    
    #local Z=0;
    #while(Z<Steps)
        #local X=0;
        #while(X<Steps)
            #local TempPt = trace(Object, 
                MinExt+(<X,0,Z>*Size/(Steps-1))-y, y);
            
#if((TempPt.y<LowestPt.y)&((TempPt.x!=0)|(TempPt.y!=0)|(TempPt.z!=0)))
                #local LowestPt = TempPt;
            #end
            #local X=X+1;
        #end
        #local Z=Z+1;
    #end
    (LowestPt)
#end

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Simen Kvaal
Subject: Re: Question!
Date: 27 Mar 2000 02:20:36
Message: <38df0bc4@news.povray.org>
Thank you! I will test it as soon as I can! It would be great if it worked.
It's so difficult sometimes to place an arbitrari isosurface on the 'ground'
when I want to...

Simen.

>This version seems to work fine, although I haven't heavily tested it
>yet. It returns the lowest point instead of positioning the object on a
>surface at y=0.
>


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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