#### Archived

This topic is now archived and is closed to further replies.

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

This topic is 6181 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
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.

##### Share on other sites

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 :-)

##### Share on other sites
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.

##### Share on other sites
>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

Edited by - dansteph on October 21, 2001 6:18:29 AM

##### Share on other sites
Wow, Nice Graphics!
Kinda makes me feel like a beginner (which I am)

##### Share on other sites
Thanks

And the wave are animated in real time

1. 1
2. 2
3. 3
Rutin
18
4. 4
5. 5
JoeJ
13

• 14
• 10
• 23
• 9
• 49
• ### Forum Statistics

• Total Topics
632639
• Total Posts
3007590
• ### Who's Online (See full list)

There are no registered users currently online

×