mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-25 19:17:06 -06:00
A shape seen through a 3-D camera preset (isometric, perspective...) or turned with a:camera/a:rot drew flat and front-on. PowerPoint turns the shape's plane in space and projects it. Fitted black-box to its exports (a picture with coloured corner markers under every preset and several rotations; every fit within half a point on a 100 x 75 pt shape): points about the centre are turned Rz(-rev) Rx(lat) Ry(lon), perspective cameras then dividing by D / (D - z) with D about 5-16 shape sizes; a:rot turns the other way about the horizontal and vertical axes. DeckCraft now draws the shape under the affine transform that best fits its turned corners: exact for orthographic cameras, within 2% of the size for perspective ones (an affine map can't foreshorten). Oblique cameras leave a flat shape as it is; depth (extrusion) is not drawn. Wild synthetic set: camera presets 15.02 -> 6.35, 3-D picture styles 16.00 -> 7.72, extruded cameras 21.41 -> 19.74. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>