- #1
Galap
- 139
- 0
I'm working on an animated short, and want to find ways to quickly calculate the positions of objects on the drawing plane from their changing positions in the imaginary 3D space.
The thing that has me slightly stuck at the moment is figuring out how to creata a 'moving forward' loop in perspective (I'll explain this more specifically later) . I've done it before using intuition with pretty good results, but this time since the objects are very close together and kind of tricky to draw, I want to know the mathematical basis for where I should be drawing them.
As a convention, let's call the horizontal dimension in the paper x, the vertical dimension y, and the 3rd projected dimension z.
There is a line of objects that for all intents and purposes can be treated as a set of vertical lines in a yz plane that are offset from the center by some distance in x. suppose the true height of the lines is a, and the true spacing between them is d. I've already figured out a way to draw these correctly in perspective (i.e. get the correct diminishing apparent distance for the equidistant objects) If you're having trouble visualizing the situation from my description, imagine looking down a straight flat road lined with equidistant telephone poles. Forgetting about the z dimension, subsequently distant poles appear closer and closer to the center of the paper/projection plane, but the distance between pole n-1 and n is greater than the distance between pole n and n+1. The question I initially had was: by how much? I subesequently figured out the answer using straight edge and compass techniques.
Now the question I have is this: I want to depict motion in the z axis, so the vertical lines will come nearer to the viewer by a certain amount per frame. The thing is, I want to be able to do a loop, for the approaching lines to produce an identical configuration every n frames.
So, what this physically means is, I want to divide the rectangle formed by the two vertical lines and the imaginary lines that connect the tops and bottoms into n congruent strips, the new lines dropping down being the positions of the columns in subsequent frames. It's easy to divide a rectangle into n congruent rectangles, but what about the perspective projection? Like in the case of the equidistant poles themselves, the projections of the farther strips will be shorter in the x dimension (and y dimension also but this value is trivial to figure out because you can just draw lines between the tops and bottoms of the columns and drop the new line down at the appropriate x position), and the projections of the closer strips will be larger, but the question again is by how much? This is much harder than the problem I was able to solve earlier because it has the boundary constraints of having to fit into a set interval, rather than just going down the line.
I've attempted to condense this into a 'math problem' format; here it is: (I hope this isn't against the rules: I'm merely trying to present it like this for clarity's sake)
Suppose there exists a rectangle with side lengths h and d. we can take the value for h that appears for the nearest column to be the absolute height, for reasons that will become apparent later. Now, suppose the rectangle is facing perpendicular to you, i.e. you are looking down the long end of the rectangle, the rectangle is in the yz plane. The near side of the rectangle is then shifted in the direction normal to its plane (in the x direction) by distance a.
a. What apparent angle θ (angle drawn on the paper, the projection into the xy plane) do you see for the nearest (to the observer, in the z dimension) pair of angles in terms of a and h?
b. what is the projected distance between the vertical sides of the rectangle in terms of a, h, d, and θ?
c. suppose the rectangle is divided into n congruent rectangles by equidistant vertical lines. labeling the vertical lines l1, l2, l3,...,lk wiht l1 closest to us and ln farthest away, what is the projected distance in the x dimension of general lk from lk-1 (calling l1 zero) in terms of a, h, d, and θ?
I hope I've explained the set up well enough. I can clarify further if necessary.
The thing that has me slightly stuck at the moment is figuring out how to creata a 'moving forward' loop in perspective (I'll explain this more specifically later) . I've done it before using intuition with pretty good results, but this time since the objects are very close together and kind of tricky to draw, I want to know the mathematical basis for where I should be drawing them.
As a convention, let's call the horizontal dimension in the paper x, the vertical dimension y, and the 3rd projected dimension z.
There is a line of objects that for all intents and purposes can be treated as a set of vertical lines in a yz plane that are offset from the center by some distance in x. suppose the true height of the lines is a, and the true spacing between them is d. I've already figured out a way to draw these correctly in perspective (i.e. get the correct diminishing apparent distance for the equidistant objects) If you're having trouble visualizing the situation from my description, imagine looking down a straight flat road lined with equidistant telephone poles. Forgetting about the z dimension, subsequently distant poles appear closer and closer to the center of the paper/projection plane, but the distance between pole n-1 and n is greater than the distance between pole n and n+1. The question I initially had was: by how much? I subesequently figured out the answer using straight edge and compass techniques.
Now the question I have is this: I want to depict motion in the z axis, so the vertical lines will come nearer to the viewer by a certain amount per frame. The thing is, I want to be able to do a loop, for the approaching lines to produce an identical configuration every n frames.
So, what this physically means is, I want to divide the rectangle formed by the two vertical lines and the imaginary lines that connect the tops and bottoms into n congruent strips, the new lines dropping down being the positions of the columns in subsequent frames. It's easy to divide a rectangle into n congruent rectangles, but what about the perspective projection? Like in the case of the equidistant poles themselves, the projections of the farther strips will be shorter in the x dimension (and y dimension also but this value is trivial to figure out because you can just draw lines between the tops and bottoms of the columns and drop the new line down at the appropriate x position), and the projections of the closer strips will be larger, but the question again is by how much? This is much harder than the problem I was able to solve earlier because it has the boundary constraints of having to fit into a set interval, rather than just going down the line.
I've attempted to condense this into a 'math problem' format; here it is: (I hope this isn't against the rules: I'm merely trying to present it like this for clarity's sake)
Suppose there exists a rectangle with side lengths h and d. we can take the value for h that appears for the nearest column to be the absolute height, for reasons that will become apparent later. Now, suppose the rectangle is facing perpendicular to you, i.e. you are looking down the long end of the rectangle, the rectangle is in the yz plane. The near side of the rectangle is then shifted in the direction normal to its plane (in the x direction) by distance a.
a. What apparent angle θ (angle drawn on the paper, the projection into the xy plane) do you see for the nearest (to the observer, in the z dimension) pair of angles in terms of a and h?
b. what is the projected distance between the vertical sides of the rectangle in terms of a, h, d, and θ?
c. suppose the rectangle is divided into n congruent rectangles by equidistant vertical lines. labeling the vertical lines l1, l2, l3,...,lk wiht l1 closest to us and ln farthest away, what is the projected distance in the x dimension of general lk from lk-1 (calling l1 zero) in terms of a, h, d, and θ?
I hope I've explained the set up well enough. I can clarify further if necessary.
Last edited: