georepl / georepl

GeoRepl - combine Constructive Geometry with a Clojure Repl
20 stars 1 forks source link

transformation layer #3

Closed georepl closed 8 years ago

georepl commented 8 years ago

Until now, drawing and all other kinds of geometric manipulations taking place in georepl use screen coordinates. Since the user cannot make any explicit use of the algebraic representation of shapes this was no problem. And the fact that Quil gives us coordinatres in non-mathematical ordering, i.e., the y-axis is turned upside down, so the upper left corner of the screen is (0, 0) and (500, 500) is 500 units right and 500 units below (0, 0), needed only be considered in one place of the implementation.

This will change now since the algebraic interpretation of shapes is going to be made available to the user.

There is a transformation layer to be implemented which maps world coordinates to sreen coordinates and vice versa. Here, an appropriate scaling must be supplied so objects in world coordinates can be automatically sized to be sensibly visible on the screen. It must be possible to override this automatic behaviour. And in the future, the transformation layer will be the place to project 3D (floating point) world coordinates to (integer) screen coordinates.

georepl commented 8 years ago

Change of plan: coordinates should be handled as generic GeoRepl objects (compounds) and coordinate transformations should be definable by users.