Geometry Expressions

Binary Clock

Code Generation

With Geometry Expressions, you can draw a diagram and get code generated directly in any one of a dozen different languages.

Cut and paste the code and avoid transcription errors!

Picture 1

Arcing a Segment

You have code to draw a segment, but you want to allow the user to bow the segment out by a specific amount to turn the straight segment into an arced segment.

You want to find the radius of the arc

We see how to get a code snippet for a single scalar value.

Picture 2

Distance From a Point to a Segment

What is a nice formula for the perpendicular distance between a line segment and a point?

We see how to get code as a function.

Picture 3

Intersection

Geometry Expressions can generate code for the coordinates of a point.

In this example, we create C++ code for the intersection point between two line segments.

Picture 3

Center of Curvature

You want to display the circle of curvature of a user defined curve.

We see how to use the generic functions in Geometry Expressions to create such code with placeholder code for the functions themselves.