Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding coordinate system to docs #244

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abanuelo
Copy link
Contributor

Description

As discussed, there is a need to have a single page describing the Scenic coordinate system.

Issue Link

N/A

Checklist

  • I have tested the changes locally via pytest and/or other means
  • I have added or updated relevant documentation
  • I have autoformatted the code with black and isort
  • I have added test cases (if applicable)

Additional Notes

@abanuelo abanuelo requested review from dfremont and Eric-Vin April 23, 2024 18:19
Copy link
Collaborator

@Eric-Vin Eric-Vin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall! A few comments:

  • We should probably adjust the Orientation entry now that we have this page, maybe cleaning it up a little and linking to the coordinate systems page.
  • It doesn't look like this page is available in the sidebar. Maybe we should add it under Language Reference?
  • We might want to instruct users on how to manually compose rotations, i.e. that A followed by B is A*B, which is the opposite of typical quaternions since we're using intrinsic angles. See here for more details. @dfremont any thoughts on this?


1. The :specifier:`on {region}` specifier specifies :prop:`parentOrientation` whenever the region in question has a :term:`preferred orientation`: a `vector field` (another primitive Scenic type) which defines an orientation at each point in the region.
2. The :specifier:`ahead of` specifier only specifies :prop:`parentOrientation` *optionally*, giving it a new default value: if you want a different value, you can override that default by explicitly writing :specifier:`with parentOrientation {value}`.
3. The general operator :scenic:`{X} relative to {Y}` can interpret vectors and orientations as being in a variety of local coordinate systems
Copy link
Collaborator

@Eric-Vin Eric-Vin Apr 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add more detail here and/or link to the specifier page, since this specifier can be particularly confusing. Specifically, tuple syntax (e.g. (3,3,3)) are interpreted as Vectors, and can give un-intiuitive results. See here for more details.

If you want to specify an objects coordinate system relative to other objects, there are specifiers for the :prop:`orientation` to do so.

1. The :specifier:`on {region}` specifier specifies :prop:`parentOrientation` whenever the region in question has a :term:`preferred orientation`: a `vector field` (another primitive Scenic type) which defines an orientation at each point in the region.
2. The :specifier:`ahead of` specifier only specifies :prop:`parentOrientation` *optionally*, giving it a new default value: if you want a different value, you can override that default by explicitly writing :specifier:`with parentOrientation {value}`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can generalize this? I think most position specifiers can optionally specify parentOrientation at level 3, and on does it at level 2.

@dfremont dfremont added this to the 3.0.0 milestone May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants