当前位置:网站首页>Coordinate knowledge in digital twin campus scenarios
Coordinate knowledge in digital twin campus scenarios
2022-08-02 18:33:00 【InfoQ】
When developing a digital twin visualization project, various coordinate-related issues are often encountered that may lead to a decrease in the efficiency of delivering the project.Regarding coordinates, there may be these questions:
① What is a coordinate system?What coordinate system does low-code ThingJS use?
②What information is needed in the scene to determine the position of an object?
In this issue, we will focus on the knowledge of coordinates in the park scene.
Basic concepts, classifications and pivot points of coordinates (systems)
Basic concepts and classifications
From the perspective of space, the coordinate system can be roughly divided into twoCategory: plane coordinate system, space coordinate system.Coordinates will also have corresponding expressions.
① Planar coordinate system
② Space (Cartesian) coordinate system
The coordinate system of low-code ThingJS is a right-handed coordinate system, that is, the Y-axis is up and the Z-axis is out of the screen, as shown below:
and the space rectangular coordinate system is that the directions of the three axes are different.Place the right hand at the origin, so that the thumb, index finger and middle finger are at right angles to each other. When the thumb points to the positive direction of the x-axis, and the index finger points to the positive direction of the y-axis, the direction pointed by the middle finger is the positive direction of the z-axis.
Compare the coordinate systems in 3DsMax:
It can be seen that if you want to convert the coordinates [x1,y1,z1] in Max to ThingJS, you need to exchange y and z and then invert, as shown below:
Pivot point
The objects placed in the park may beRegular or irregular.In order to better control the position of an object and scale/rotate, when expressing the coordinates of an object, we will use the "pivot point" of the object to represent the position of the object.Simply put, the pivot point of the object is the origin of the object's own coordinate system.
For example: This is a tree in the park. If the pivot point is on the ground when zooming, the entire tree can be zoomed upwards.
If the pivot point is in the center, it willInconvenient to control, the roots will stick to the ground.As shown below:
For another example, a radarThe pivot point should be the center of the rotation axis for easy rotation control.If the pivot point is on the cover, it's complicated to think about....
Classification of coordinate systems
What are the classifications based on "right-handed coordinate system"?In different usage scenarios, choosing a suitable coordinate system will make us do more with less.
1. World coordinate system
The world coordinate system is also called the global coordinate system or the absolute coordinate system.When the scene (not referring to the park) is created, a position is plotted in the entire scene space, and the coordinate system of the scene space at this time is the world coordinate system.
The coordinates of an object in the world coordinate system are the absolute coordinates of the object.
Use the scene: The object is independent, and its movement is not affected by other objects in the scene, only related to the entire scene.
2, parent object coordinate system
When a park is created in the scene, and an aircraft is placed under the park, the aircraft is a sub-object of the park. If you want to set the position of the aircraft in the coordinate system of the park, the coordinate system of the park is the aircraft.The parent object coordinate system.
PS: When there is only one park in the scene, the coordinate system established with the park as a reference = the world coordinate system, that is to say: the coordinates of the aircraft in the world coordinate system and the coordinate values of the parent object are consistent.
Scenario: The movement of an object is affected by another object. At this time, a coordinate system can be established with reference to "another object" as the parent object coordinate system of the object.
Relative coordinates
In addition to the world coordinate system, all other coordinate systems actually have the concept of "relative" in it.Taking any object as a reference to describe the spatial position of other objects relative to the object is
relative coordinates
.
An object can only have one absolute coordinate, and there can be an infinite number of relative coordinates.
3, own coordinate system
Sometimes we also want to control with itself as the coordinate system.For example, if the plane flies forward 20 meters, it is to set the coordinates [0, 0, 20] in its own coordinate system (the positive z-axis of the object itself can be understood as the direction of the front of the object, such as the orientation of our face).
So the question at the beginning of the article is when you see a certainWhen the coordinates of the position of an object are [5, 18, 10] (assuming the coordinates are the coordinates in the ThingJS standard right-hand coordinate system), what information is needed to determine the position of this object?The first thing to know is whether this coordinate is an absolute coordinate or a relative coordinate.Second, if it is a relative coordinate, you also need to know who it is relative to.
Understanding the above information, you can determine the location of this object.
边栏推荐
猜你喜欢
随机推荐
Mobius inversion study notes
关于小程序TabBar跳转页面跟TabBar标签栏的icon不对应的分析(debug)
网御数据库审计系统配置Radius启用双因素/双因子(2FA/MFA)身份认证
每日练习------定义一个N*N二维数组,从键盘上输入值,找出每行中最大值组成一个一维数组并输出;
打破千篇一律,DIY属于自己独一无二的商城
CefSharp practical demonstration
坚持自主创新 线控底盘领军企业英创汇智获数亿元B+轮融资
《独行月球》
Qt reads Json files (including source code + comments)
【[NOI2001] 炮兵阵地】【状压DP】
【[USACO12MAR]Cows in a Skyscraper G】【状压DP && DFS】
机械臂速成小指南(十八):圆弧规划
tiup mirror set
品牌方发行NFT时,应如何考量实用性?
2.7 - 文件管理 2.8 - 多级目录结构 2.9 - 位示图
JZ71 跳台阶扩展问题
想要白嫖正则是吧?这一次给你个够!
#yyds干货盘点# 面试必刷TOP101: 删除链表的倒数第n个节点
ROS人机交互软件
Redis进阶之路:深度解析Redis单线程架构,图文并茂不能再清晰了