3d ellipse given two points

In summary, the conversation discusses the creation of an arc for collision checking using a grenade launcher type weapon in a game. The formula for faking ballistic trajectories is discussed, with options for scaling and sensitivity. The conversation also mentions the need for solving equations to determine where the projectile lands and varying the projectile's velocity.
  • #1
jschieck
2
0
i'm having trouble creating a arc for check for collision similar to a grenade launcher type weapon and am not very good at math :/

i have the player position and the target position, now i just need to check every so often (let's say .1 units) along the outside of my ellipse to see if my raycast has struck geometry.

so i have the 2 vector3's of position, and want the ellipse to scale on the Y axis based on the distance between them. some of it i can figure out but just don't know math well enough.

can someone cast some light on the formula i might use? basically just looking for an array of all the points on an ellipse every .1 units
 
Physics news on Phys.org
  • #2
Hi. Is it a problem of faking ballistic trajectories?

http://img193.imageshack.us/img193/8537/ballisticgraph2.png

[tex]\frac{x}{e}-d^x + 1[/tex]

e is the ratio:

[tex]e = \frac{\sin(\alpha)}{\sin(45^{\circ})}[/tex]

where α is the launch angle.

d scales the trajectory.

If you want the trajectory to be less sensitive to the value of d then use this:

[tex]\frac{x}{e}-d^{\frac{x}{10}} + 1[/tex]

The other function is more complex but I think it looks better for it:

[tex]\frac{x}{e}-\sqrt{\frac{x}{2}^x}+ 1[/tex]

http://img205.imageshack.us/img205/5281/ballisticgraph3.png

I think it looks like a missile trajectory, no?

You need to solve

[tex]\frac{x}{e}-d^{\frac{x}{10}} + 1 = 0[/tex]

or

[tex]\frac{x}{e}-\sqrt{\frac{x}{2}^x} + 1 = 0[/tex]

to find out where the projectile lands in either ballistic graph. Then you simply interpolate in the graph between 0 and where the projectile lands according to the distance to target you've have elapsed so far between the player and target positions.

However, there still remains the problem of varying the projectile's velocity.

Maybe a calculus guru can pitch in.
 
Last edited by a moderator:

1. How do you find the center of a 3D ellipse given two points?

To find the center of a 3D ellipse given two points, you can use the midpoint formula which states that the midpoint of a line segment is the average of the x-coordinates and the average of the y-coordinates. Therefore, the center of the ellipse would be at the midpoint of the line connecting the two points.

2. What is the equation for a 3D ellipse given two points?

The equation for a 3D ellipse given two points is (x - h)^2/a^2 + (y - k)^2/b^2 + (z - l)^2/c^2 = 1, where (h,k,l) is the center of the ellipse and a, b, and c are the lengths of the semi-major, semi-minor, and semi-vertical axes respectively.

3. How do you plot a 3D ellipse given two points?

To plot a 3D ellipse given two points, first find the center of the ellipse using the midpoint formula. Then, use the equation for a 3D ellipse to determine the values of a, b, and c. Finally, plot the ellipse by finding points that satisfy the equation and connecting them.

4. Can you find the eccentricity of a 3D ellipse given two points?

Yes, you can find the eccentricity of a 3D ellipse given two points using the formula e = √(1 - (b^2/a^2)), where a and b are the lengths of the semi-major and semi-minor axes respectively. The eccentricity of an ellipse is a measure of how elongated or "squished" the ellipse is, with a value of 0 representing a circle and a value closer to 1 representing a more elongated ellipse.

5. Are there any real-life applications for finding the 3D ellipse given two points?

Yes, there are many real-life applications for finding the 3D ellipse given two points. For example, this concept is used in satellite tracking and orbit prediction, as well as in engineering and architecture for designing curved structures. It can also be used in computer graphics for creating 3D models and animations.

Similar threads

  • Differential Geometry
Replies
8
Views
3K
  • Differential Geometry
Replies
12
Views
6K
Replies
1
Views
3K
  • Differential Geometry
Replies
4
Views
9K
Replies
1
Views
775
Replies
4
Views
3K
  • Differential Geometry
Replies
4
Views
12K
  • Special and General Relativity
Replies
8
Views
878
Replies
4
Views
722
  • Sci-Fi Writing and World Building
Replies
1
Views
522
Back
Top