You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

tsukada

Beginner

  • "tsukada" started this thread

Posts: 27

Location: Tokyo, Japan

Occupation: Programmer

  • Send private message

1

Thursday, June 15th 2017, 10:20am

How to calculate width/ox/oy/rx/ry/rz from ath/atv

I need help.

Is there any way to calculate hotspot's attributes from four corner coordinates of a distorted rectangle in a scene.

For example, the four corner coordinates (ath, atv) are like:


left top: -5.5, 32.0
right top: 11.8, 34.4
right bottom: 10.5, 42.8
left bottom: -7.6, 40.1

[img]https://krpano.com/forum/wbb/index.php?page=Attachment&attachmentID=2113&h=cefe5977574691920bd2f160f6f9e743e6c48d96[/img]

The rectangle in the scene has aspect ratio of 16:9.

In this case, if I want to place a hotspot image exactly to fit into the background rectangle image, currently I manage to do that manually by trial and error.
But if I want to calculate width, height, rx, ry, rz, (edge, ox, oy if needed) values from the values above, is there any formula?

Thanks in advance.


tsukada has attached the following image:
  • four.jpg