3dmath guru : create a shape given vector (image)

Started by
6 comments, last by dansteph 22 years, 6 months ago
I want to create a trail for a missile formed with two plane I can give each frame the new position this will make a vector but I have no idea how to calculate the vertice to forme my two plane. (triangle strip) those plane will be updated each frame to make the strip polygon grow until it break in a new strip ect ect so it must be a fast function. I have read a lot of tutorial on 3d math but I didn't found one that have some picture to explain how does the math act in a 3d space... so I'm lost. Any idea ? Edited by - dansteph on October 19, 2001 9:59:09 PM Edited by - dansteph on October 19, 2001 10:01:19 PM
Advertisement
No one ?

Or eventually a GOOD tutorial on 3d math all the one I have seen
display a whole range of number without any representation of what they do.
Help yourself and god will also,

Got It !

My class trail have a pointer to the object class and get its
matrix as well as its bounding box value.

than by calling D3DXVec3Transform I get the four point of the missile''s back already transformed.

Now just matter of constructing the face (on the way)

Dan :-)

I''m confused on what you''re trying to say...
From what I deduce, you''re trying to find a way to calculate the 8 vertices points needed to form the 2 planes.
4 vertices for each plane.
2 vertices behind the missile, and 2 vertices farther away, per plane.

I don''t think I can give you the math for this, cause I tend to get confused easily. Anyway...

I don''t know why you need 2 new planes per frame...but vertex generation should be pretty easy. The 4 vertices behind the missile (2 vertices * 2 planes) should all lie on a plane. That plane''s normal is coincidentally, the new position vertex - the old position vertex. (that''ll be the change in position that the missile experiences per frame.)

Just find the 4 points on that plane that are equally spaced at 90 degrees around the pivot point (where the plane and normal intersect). (here''s where someone else will have to help. It''s too confusing for me)

The tricky part of finding the vertices is how they will be positioned so that the player can see the trail rather well.
Unfortunately, you can only rotate along one axis, the change in position vector.

Any points that were generated in previous frames should remain, or experience an upward translation (since smoke effects sometimes rise); until it''s okay to remove them from the missile trail.

In a nutshell...here''s what it should look like.
#''s represent frames. Missile Direction ->
2 3
1 2 3 4
1 2 3 4
1 4

2 3
2 3 4 5
2 3 4 5
4 5

and so on. Every frame generates a new set of vertices for the trail. Sorry if I don''t explain it very well.


Well thanks but its already done :-) (read my previous post)
>The tricky part of finding the vertices is how they will be >positioned so that the player can see the trail rather well.

Oh I won't bother with some kind of bilboarding trying to distording the trail it's enough tricky like this,
in fact the section will look like a cross so it will always been visible. You can see this on the first picture or in ascii art below.
  x     x x   x  x x   x  x x x   xx     x //The trail seen from behind  


Many thanks for reply.

Edited by - dansteph on October 21, 2001 6:18:29 AM
Wow, Nice Graphics!
Kinda makes me feel like a beginner (which I am)
Thanks

And the wave are animated in real time

This topic is closed to new replies.

Advertisement