oz.Geometry is a plug-in bundle for the graphic development environment Quartz Composer.
It is the result of a personal lack of solutions to quickly transform « drawings » in Quartz Composer, make them grow, follow a path, search for nearest points, etc.
Be aware that these patches are acting on CPU built arrays so they can be chained together, not on GPU: any vertices transformation is far more heavy for performance.
- 32 / 64 bits, 10.7+
- Uses my OZGeom library also used in oz.Strings and oz.Box2D, please make sure these plug-ins are updated too if you use them.
- Use poly2tri for triangulation
- Use Clipper library for clipping
- To be installed in Quartz Composer Plug-Ins folder.
- Is made to output values to be rendered with Kineme GL Tools (or other GL based rendering plug-ins).
- Contains 21 patches:
- 2D Ellipse: build a simple 2D (at Z = Z input) ellipse closed line structure according to the input number of vertices
- 2D Rectangle: build a simple 2D (at Z = Z input) rectangle closed line structure according to the input number of vertices
- 3D Bounds: get the bounds and center point of a 3D line structure.
- 3D Is Counter ClockWise: checks if the input Line STructure has been built counter clockwise.
- 3D Is Point Inside Bounds: checks if a point is inside the bounds of a 3D Line Structure.
- 2D Contains: checks if a Line Structure contaisn another Line Structure.
- 3D Close Polygon: closes a polygon by duplicating the first vertex of a Line Structure.
- 3D Remove Duplicates: removes the duplicates in a Line Structure.
- 2D Smooth Line Structure: smooth a Line Structure according to the input ratio and steps (points between each original vertex).
- 3D Simplify Line Structure: simplify an input Line Structure according to the input tolerance.
- 2D Rotate Z: rotates a Line Structure around the Z axis.
- 3D Scale: scales a Line Structure.
- 3D Translate: translates a Line Structure.
- 3D Flip: flip horizontally, vertically or in depth a Line Structure
- 3D Grow Line Structure: grows the input Line STructure according to a normalized input ratio (begin -> end)
- 3D Follow Path: outputs an (X, Y, Z) point on the input Line Structure according to the input ratio (0. -> 1.)
- 3D Morph Line Structure: morphs a Line Structue to another one according to the input ratio (0. -> 1.)
- 2D Convex Hull: outputs a closed line structure of the input Line Structure’s convex hull
- 2D Clipper: outputs a line structure made of the clipping operation between input Line Structure 1 and input Line Structure 2
- 2D Constrained Delaunay: performs a 2D Constrained Delaunay operation on the input Line Structure and output a resulting Triangle Structure (handles self-intersecting polygons via clipping)
- 2D Constrained Delaunay With Holes: performs a 2D Constrained Delaunay operation on the input structure of Line Structures and output a resulting Triangle Structure (handles self-intersecting polygons via clipping; compared to the oz.Strings Triangulate patch it is 1D less)
- Support self-intersecting polygons (see oz.Geometry plug-in for triangulation with holes, and oz.Strings plug-in to get triangles from strings)
- Does not include examples (in the TODO list)
- USE AT YOUR OWN RISK !
- Is released as DonationWare
- Is licensed under Creative Commons Share Alike Attribution 4.0 (Commercial).
- Known issues:
- TO BE TESTED BETTER
- 2D functions are – most of the time – not working with 3D: make evrything 3D (oops… triangulation…)
- Todo list:
- TO BE TESTED BETTER
- Feed the library with others geometric functions
- Implement my « old » Line->’Width Polygon’ function
- Implement my « old » editor that allows drawing directly in QC
- Implement « get structure in bounds »
- 3D Rotations with matrices
- Make examples
- Be inspired…
THIS PLUG-IN IS STILL IN BETA VERSION.
I would be very grateful for any feedback.