Just wondering, does anyone want some docs for Spherical
and Polar
?
If so, what section[s] would they be in (e.g. features/divingDeeper
)?
I would think the class would need their own page[s].
Just wondering, does anyone want some docs for Spherical
and Polar
?
If so, what section[s] would they be in (e.g. features/divingDeeper
)?
I would think the class would need their own page[s].
You mean as in the coordinate systems/projections? Got to be a little but more specific as these mean several things.
Polar is a 2D Projection, while Spherical is a 3D Projection. They kind of both work along the same idea, two values representing their location in space, but with Spherical there is a third value that represents the distance from origin.
I mean for this: Babylon.js/math.polar.ts at master · BabylonJS/Babylon.js · GitHub
@Vortex is refering to these two classes
hmm tbh I have never used these methods or classes. Any time I need to do any coordinate conversions I just do it manually, so I had no clue these existed.
Reading through these, I could see their use.
What do you need to know about it? Looks like they are just Utility classes to convert between vector2/vector3 and their respective coordinate system.
It could be confusing for someone using these classes for a project… docs would be helpful for clarification and for usage explanation/demonstration.
I guess so yeah, they are pretty self explanatory though if you understand the two coordinate systems.
Ummm, I guess some examples would be cool for people though. <3
Seems to boils down to how responsible is Babylon in educating people about math concepts and their usage. I have not looked lately but do we have any tutorials on like Vector manipulation or anything like that?
Generally there are no docs about vectors, quaternions or other maths classes, probably because they are general areas rather than specific to Babylon.js. The same applies to spherical and polar coordinates.
The question is wether it would be useful to have a section features/deepdive/math
That’s kind of what I was thinking. Its not so much a Babylon thing as a math thing.
If you know how to work with those two coordinate systems with raw math concepts then the supporting classes make a lot more sense and don’t really require much explanation. Its one of those once you know it you know it things.
An overall doc page for math concepts (features/deepdive/math) would be awesome! I can write the Spherical/Polar coordinate system part.
cc @PirateJC
@Vortex while you are waiting to see what people think of the idea of the math page in the docs here is a suggestion.
If you look at theVector3 section of the API you will see that the properties and methods have an example PG showing the use of each of these in a context for a purpose where possible.
A PR of example PGs has been submitted for Vector2 and for your pitchRollYawToMoveBetweenPoints methods in Vector3.
It would be useful if the properties/methods for Polar and Spherical had similar examples and is one way of achieving docs for them even if not in the ‘book’ part of the docs. How would you feel about doing examples for Polar and Spherical?
The rough rule of thumb is :-
The class has an overview PG and the each example PG for a class has
Sure, I can make some demo PGs. Do you have any use-case suggestions?
Polar graphs for polar would be one idea. Spherical coordinates nothing jumps out, placing objects on a planet perhaps.
What ideas did you have when proposing their inclusion?