开发者

Convert 3D(x,y,z) to 2D(x,y) (orthogonal) along its direction

开发者 https://www.devze.com 2023-02-06 10:49 出处:网络
I have gone through all available study resources in the internet as much as possible, which are in form of simple equations, vectors or trigonometric equations.

I have gone through all available study resources in the internet as much as possible, which are in form of simple equations, vectors or trigonometric equations. I couldn't find the way of doing following thing:

Assuming Y is up in a 3D world. I need to draw two 2D trajectories orthogonally (not the projections) for a 3D trajectory, say XY-plane for side view of the trajectory w.r.t. the trajectory itself and XZ-plane for top view for the same.

I have all the 3D points of the 3D trajectory, initial velocity, both the angles can be calculated by vector mathematic开发者_StackOverflows.

How should I proceed further?

refer: Below a curve in different angles, which can loose its significance if projected along XY-plane. All I want is to convert the red curve along itself, the green curve along green curve and so on. and further how would I map side view to a plane. Top view is comparatively easy and done just by taking X and Z ordinates of each points.

I mean this the requirement. :)

Convert 3D(x,y,z) to 2D(x,y) (orthogonal) along its direction

Convert 3D(x,y,z) to 2D(x,y) (orthogonal) along its direction


I don't think I understand the question, but I'll answer my interpretation anyway.

You have a 3D trajectory described by a sequence of points p0, ..., pN. We are given an angle v for a plane P parallel to the Y-axis, and wish to compute the 2D coordinates (di, hi) of the points pi projected onto that plane, where hi is the height coordinate in the direction Y and di is the distance coordinate in the direction v. Assume p0 = (0, 0, 0) or else subtract p0 from all vectors.

Let pi = (xi, yi, zi). The height coordinate is hi = yi. Assume the angle v is given relative to the Z-axis. The vector for the direction v is then r = (sin(v), 0, cos(v)), and the distance coordinates becomes di = dot(pi, r).

0

精彩评论

暂无评论...
验证码 换一张
取 消