POV-Ray : Newsgroups : povray.binaries.images : Fireworks again :( (65Kb) : Re: Fireworks again :( (65Kb) Server Time
5 Oct 2024 01:16:12 EDT (-0400)
  Re: Fireworks again :( (65Kb)  
From: Adam J Cooper
Date: 1 Feb 1999 22:59:27
Message: <36B67879.CFB2CEE6@mediascribe.net>
I've been doing some thinking, and I think the rotations are not only
very possible, but not that difficult if coded correctly. I'm sick right
now and on NyQuil, so I'm not sure how much sense this will make, but
here goes...

First, define a variable for the camera location (ala Chris Colefax).
Second, within the fireworks macro, have variables defined for i, j, and
k (the x, y, and z components of the vector we will consider).
Let's say the camera is at point C, and the proposed fireworks object is
at point F. If we know the location of F and C, we can calculate the
vector CF(which would be F - C), and set the values of i, j, and k.
Then--using our values in i, j, and k--we should be able to use arctan
twice--consider the vector from two perspectives in 2d--and store two
angles which we can use to rotate the object around two axis's, thus
rotating the object along the line between the camera location and the
proposed fireworks object location. From there, just translate the
rotated object to the proposed location. No need for vector normals or
anything. In fact, the only real vector math is a subtraction. Does this
make sense? I'd really appriciate any comments.

~Adam



Spider wrote:
> 
> The biggest problem as i see it is the angling of the disc. It will need
> some sever rotation to fit it so it will be shown towards the camera.
> 
> //Spider
> 
> Adam J Cooper wrote:
> >
> > I really like how you've progressed with this--are you only using
> > spheres? Is there a way you could use a sphere-disc combination? Sort of
> > do a small lens flare for each particle. Make the sphere and disc have
> > an ambient of 1.0, make the disc quite larger than the sphere, give the
> > disc a wood pattern which fades from the color value desired in the
> > center to complete translucent (or filter whichever is appropriate) at
> > the edge, make the whole thing shadowless and... viola! In theory you
> > should have glowing particles. If I'm way off the mark here someone
> > correct me.
> >
> > Speaking of rotateing an object toward the camera... Is there an easy
> > way to do that in POV or do you need to set a camera vector and
> > calculate surface normals?
> >
> > Happy Tracing,
> > ~Adam


Post a reply to this message

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