Conversation
Signed-off-by: Avnish Jaltare <avnishjaltare8@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds documentation and tests demonstrating that GO.transform accepts callable CoordinateTransformations.jl transforms (notably LinearMap-based rotations), including examples for rotating about the origin and about a polygon’s centroid.
Changes:
- Added new transformation tests covering polygon rotation around the origin and around the centroid (centroid/area invariants).
- Expanded
transformdocstring with CoordinateTransformations.jlLinearMaprotation examples. - Extended the “creating geometry” tutorial with rotation examples and visualization.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/transformations/transform.jl | Adds rotation-focused testsets for GO.transform, including centroid/area assertions. |
| src/transformations/transform.jl | Updates transform documentation to explicitly mention callable transforms and shows LinearMap usage. |
| docs/src/tutorials/creating_geometry.md | Adds tutorial content demonstrating rotation about origin vs centroid using composed transforms. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| We can also rotate a polygon with the same `transform` function. A `LinearMap` | ||
| rotates around the origin. |
|
Hey @asinghvi17 Please take a look when you're free, the failed check does not seem related to changes |
|
Thanks for the PR! I think LinearMap is a bit too complex to be in a beginner tutorial. Would you mind changing this to use something from Rotations.jl instead? |
2 similar comments
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
|
Sure I will take a look at Rotations.jl and confirm the approach with you |
|
Hey would |
|
I would recommend Angle2D. 99% of users here will be performing 2D operations, so that's what is relevant to them. |
Summary
This PR expands the
transformdocumentation with rotation examples and adds test coverage for those workflows.Changes
CoordinateTransformations.LinearMapexamples for rotating polygonscreating_geometry.mdshowing both rotation approaches visuallyFixes: #192
All tests passed locally