Author Topic: Slope Formula for Ramps  (Read 4075 times)

I am working on a conversion script, I need to know the formula that is used to get slope (degrees) of ramps.

NOTE:
I'd perfer the straight out conversion from degrees to actual axis interval, although, the formula to get the slope (degrees) of ramps might help out too.
« Last Edit: December 24, 2012, 01:05:07 AM by Altiris »


Umm.. rise/run?
Is there a even for formula for this? I am not sure which is why I am asking.

I'm unsure what you're asking. Can you give an example?

I think he wants the angle, not the slope.

I think this:
%angle = mATan(%o,%a);
%o = opposite
%a = adjacent

I'm unsure what you're asking. Can you give an example?
Alright so here's an example, 25 degrees is 1.5 when its a regular integer (a normal brick), what is the formula used to calculate this?
(If you still don't understand tell me and I will try another example)



Then you would use what I posted previously.
%angle = mATan(1.5,x);
(replacing x with however long the 25 degree slope is, i don't remmeber)

The problem with this is that bricks aren't perfect triangles, they have a little flat edge on the bottom before the slope

Then you would use what I posted previously.
%angle = mATan(1.5,x);
(replacing x with however long the 25 degree slope is, i don't remmeber)

The problem with this is that bricks aren't perfect triangles, they have a little flat edge on the bottom before the slope
Oh okay thanks, you said x is however long the slope is, can I measure that with bricks? I put 1x1 bricks from the start of the 25 degree ramp to the end and it was 3 bricks, can I use that or it has to be something else?

« Last Edit: December 23, 2012, 09:15:16 PM by Altiris »

I think the brick height is more like 1.3333...
And yes the length is 3, that sounds right

Though remember mATan returns a number in radians, if you want degrees you'd have to use mRadToDeg
And it'll still be off a little because:
bricks aren't perfect triangles, they have a little flat edge on the bottom before the slope


Alright I am basically starting to understand what I need to do, here's what my project is though, I am trying to make a converter for roblox and since roblox doesn't use degrees, I need the actual size interval. So basically I need a formula for that.

Ok no the length is two, I was confused


Also I have no idea what you mean anymore
« Last Edit: December 23, 2012, 09:24:06 PM by Headcrab Zombie »

Ok no the length is two, I was confused
Yeah it was either 3 or 2, I understand why its 2, thats when the slope starts but for Roblox I will have to make it 3.

Alright I am basically starting to understand what I need to do, here's what my project is though, I am trying to make a converter for roblox and since roblox doesn't use degrees, I need the actual size interval. So basically I need a formula for that.


So, you need the reverse? Angle to size?

You guys are totally missing the lip at the bottom of most ramps.