metafizzy / zdog

Flat, round, designer-friendly pseudo-3D engine for canvas & SVG
https://zzz.dog
10.36k stars 393 forks source link

New Shape; Horn #76

Open bendablegears opened 5 years ago

bendablegears commented 5 years ago

truncated cone test

This pull request adds a truncated-cone-with-spherical-caps Shape, to which I've given the slightly easier to type name Horn. It is much like a Cone or a Cylinder but each of the ends can have their diameter set independently using frontDiameter and rearDiameter. It should be useful in creating more organic models.

I tried to follow the architecture of similar Shapes but I'm not sure I succeeded in making it readable. I'm also not sure if my eccentricity calculations make any geometric sense but the effects ends up looking good enough.

desandro commented 4 years ago

Add a 👍 reaction to this issue if you would like to see this feature added. Do not add +1 comments — They will be deleted.