title: draw prism dynamically based on distance
body: <p>I would like to draw an octagonal prism which also could be oblique and its face shape and height depends on variable and edge lengths.  Where do I start?</p>
  
  <p>Could I use some function for calculating the base B coordinates considering base A is fixed:</p>
  
  <p><a href="https://i.stack.imgur.com/v6zqx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v6zqx.png" alt="enter image description here"></a>.
  <br></p>
  
  <p>PS: Base A and base B are equals.</p>