Jump to content



Should be easy find Z on a ramp with x and y (SOLVED)

  • You cannot reply to this topic
22 replies to this topic

#21 Mikekan13   Members   -  Reputation: 102

Like
0Likes
Like

Posted 27 February 2012 - 07:36 PM

YES! You sir or ma'am are a genius and I love you to the power of 100. Works perfectly!

Ad:

#22 Mikekan13   Members   -  Reputation: 102

Like
0Likes
Like

Posted 28 February 2012 - 12:24 PM

Can't get it for the reverse. I just switched the variables around so that b would be d. I also tried switching all the y subtraction math around cause I thought maybe it was giving negative values.

Attached Thumbnails

  • ramp.png


#23 before-it-was-popular   Members   -  Reputation: 110

Like
0Likes
Like

Posted 02 March 2012 - 05:59 PM

As you seemed to be thinking, you can indeed change the ramp direction by switching around where A, B, C, and D are. Note that the vectors e1 and e2 that point along the sides of the tile are defined to point from D to A and D to C; e1 is the 'up the ramp' vector, so moving from D to A should move you up the ramp, and moving from D to C should move you along the base or the top of the ramp without changing your height.

All you need to do, then, is look at the ramp orientation, choose D and C to be at low corners of the ramp, and choose A to be at the high corner that shares an edge with D. An easy way to do that is to take the corners as I defined them and rotate the point labels through as many quarter-turns as you rotate the ramp itself. For the first new picture you posted, where you increase in height as you move down and to the left, the ramp is rotated by two quarter-turns counterclockwise; that would make the left point A, the bottom B, the right C, and the top D.






We are working on generating results for this topic
PARTNERS