You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I loaded this png as material over a Rectangle and added as primitive to the scene.
The size of the rectangle side is 200m, earths curvature is fully negligible at this scale, so funky haversine stuff where the sum of angles in a triangle is no longer 180Degrees etc is not significant.
The lower left corner of the rectangle is taken from a mouseclick. The upper right corner is computed with a formula from here: http://www.movable-type.co.uk/scripts/latlong.html. Which shows the general formula for computing a second coordinate which lies at a distance and bearing from a first point.
This results in a correctly drawn rectangle on the 3D globe. (rotation = 0)
Upon rotation there can be noticed two things:
(1) The material is not rotated correctly. this seems to be the already filed here: Texture rotation incorrect #2737. (At right angles, 90 degrees etc this error doesnt occur by the way)
(2) The rotation of the rectangle geometry is not computed correctly, the square is skewed at nonzero rotations. This is visible at all rotations but strongest at 80 or 110 degrees. At 90 Degrees the square is not skewed (angles are still 90Degrees) but the sides are no longer identical in length. (so its a rectangle instead of a square, aspectRatio != 1).
In 2D view the following can be added:
At 0 Degrees rotation the square is displayed as a rectangle (aspectRatio != 1).
Under rotation this non square rectangle is maintained. So although the initial rectangle under 0 rotation is not correct, when rotated this rectangle at least doesnt "change shape / warp" as is the case for 3D.
See my answer in #3173. Rectangles follow rhumb lines so the edges will look straight in 2D and curved in 3D.
I also just submitted a fix for the rectangle texture rotation in #4725, so that should no longer be a problem. Thanks!
I made a little video in an attempt to show the problems with rectangle rotation (sorry about the music..)
https://www.youtube.com/watch?v=46xek0WHZRk
(1) The material is not rotated correctly. this seems to be the already filed here: Texture rotation incorrect #2737. (At right angles, 90 degrees etc this error doesnt occur by the way)
(2) The rotation of the rectangle geometry is not computed correctly, the square is skewed at nonzero rotations. This is visible at all rotations but strongest at 80 or 110 degrees. At 90 Degrees the square is not skewed (angles are still 90Degrees) but the sides are no longer identical in length. (so its a rectangle instead of a square, aspectRatio != 1).
In 2D view the following can be added:
See also: #3173
The text was updated successfully, but these errors were encountered: