Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Trapezium Equation

I'm trying to program chamfers into one of my game engines, I've got a neat method which involves drawing a trapezium, however I'm stuck with this equation!

trapeziumhelp.png


I know the lengths of lines A, B and C, how do I find the length of D and E?
EDIT: I know how far along line C the lines D and E are
 
If you know how far along they are just treat the section a to d as one trapezium, ignoring the rest. To get the height along c...

I assume, or this is how I would do it, treat it all proportionally. If d is 30x along the white line, then divide it by the length of the slanted line and multiply it by the length of the blue line c.

For the length of the slanted line treat the slanted line, c, and a as a triangle...

I'm confusing myself and that probably isn't helpful but idk, that's how I'd go about solving it.
 
My best friend (A maths pro) helped me with it.

X = Distance line D is from B along C
X(A-B) + B = D
,,,,C

D = Line we're trying to find height with.

chamferstart.png
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top