Re: No response?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Lewis Townsend wrote:
>
> Hey,
>
> >What no response to my challenge?
> >
> >Well, the Bogo Vault has no bounds:
> >
> >Using only the "open" function, write a function which returns all
> files
> >in a directory.
> >
> >snortboy
>
> Hey man, give people a chance.  I'm considdering your chalenge but I
> have other things to do as well.  Just slow down and you could start
> some cool threads.
>
> Right now I'm trying to figure out the formula for the distance between
> two 3D points.  My math teacher wasn't any help.  He said he couldn't
> remember but that it would probably be in a calculus book somewhere in
> chapters 12-14.  And he didn't even loan me a book, he told me to get
> one at the library (yeah right blink or ask a math Tutor.  So, can anyone
> help me here?  What I'm trying to do is enhance the 3d function that
> Lithex (I think) posted in response to a question.  It works fine except
> that it calculates perspective with Z-distance rather than real
> distance.
>
> -- original function
> function perspective (sequence thing, sequence eye)
>     sequence t, i
>     atom r
>     r = thing [Z] / (thing [Z] - eye [Z]) -- Notice this line****
>     t=thing[X..Y] i=eye[X..Y]
>     return (t + r * (i - t))
> end function
>
> I want a function that replaces this line:
>     r = thing [Z] / (thing [Z] - eye [Z])
> with something that uses the 3D distance formula instead of:
>     (thing [Z] - eye [Z])
> which is only 100% accurate when "thing" is in a strait Z-direction from
> "eye"
>
> Any help would be appreciated; also functions for rotating 3D objects
> and the camera (eye) are welcome.
>
> Sincerely,
> Lewis Townsend

<snip>

the distance between two points in 3d space is almost the
same as for 2d, it's the suare root of the sum of the squares
of the disatnce along each axis.
eg:
distance = sqroot(xdistance+ydistance+zdistance)

                Kasey

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu