<?xml version="1.0" encoding="UTF-8"?>
<NRTML:tensor name="PlaneGeometry">
<NRTML:domain type="GeometricEntities">
<!-- Coordinate System Context -->
<NRTML:entity id="Perspective1">
<NRTML:entity id="CoordinateSystem">
<NRTML:attribute name="Origin" value="(0, 0)" />
<NRTML:attribute name="Axes" value="X, Y" />
</NRTML:entity>
<!-- Square Definition -->
<NRTML:entity id="Square" type="Polygon" emergent="true">
<!-- Modular Side Definition -->
<NRTML:entity id="SideLength" value="s" />
<!-- Points of the Square -->
<NRTML:entity id="PointA" coordinates="(0, 0)" />
<NRTML:entity id="PointB" coordinates="(s, 0)" />
<NRTML:entity id="PointC" coordinates="(s, s)" />
<NRTML:entity id="PointD" coordinates="(0, s)" />
<!-- Relations Between Points (Forming Sides) -->
<NRTML:relation type="Connects" source="PointA" target="PointB" label="SideAB" value="s" />
<NRTML:relation type="Connects" source="PointB" target="PointC" label="SideBC" value="s" />
<NRTML:relation type="Connects" source="PointC" target="PointD" label="SideCD" value="s" />
<NRTML:relation type="Connects" source="PointD" target="PointA" label="SideDA" value="s" />
<!-- Emergent Properties of the Square -->
<NRTML:relation type="Perimeter" value="4 * s" emergentFrom="SideLength" />
<NRTML:relation type="Area" value="s * s" emergentFrom="SideLength" />
<!-- Geometric Properties (Angles and Parallelism) -->
<NRTML:relation type="Angle" source="SideAB" target="SideBC" value="90 degrees" />
<NRTML:relation type="Angle" source="SideBC" target="SideCD" value="90 degrees" />
<NRTML:relation type="Angle" source="SideCD" target="SideDA" value="90 degrees" />
<NRTML:relation type="Angle" source="SideDA" target="SideAB" value="90 degrees" />
<!-- Equality and Parallelism of Sides -->
<NRTML:relation type="Equality" source="SideAB" target="SideCD" />
<NRTML:relation type="Equality" source="SideBC" target="SideDA" />
<NRTML:relation type="Parallelism" source="SideAB" target="SideCD" />
<NRTML:relation type="Parallelism" source="SideBC" target="SideDA" />
</NRTML:entity>
</NRTML:entity>
</NRTML:domain>
</NRTML:tensor>
The NRTML snippet defines a tensor named "PlaneGeometry" that encapsulates the concept of a square within the domain of "GeometricEntities." It establishes a specific Perspective ("Perspective1") and a coordinate system, which provides the spatial context for defining the square.
The core entity is the Square, which is marked as emergent to signify that it arises from the relationships between its constituent elements—such as points, sides, and angles—and the constraints applied by these relations.
Mathematical Underpinnings:
Coordinates and Distance:
The points A, B, C, and D are defined by their coordinates in a Cartesian coordinate system (X, Y). The distances between the points are derived as follows"
Algorithm for Calculating Distance Between Points:
Given two points, PointA (x1, y1) and PointB (x2, y2), the distance between them is:
- Distance = square_root((x2 - x1)^2 + (y2 - y1)^2)
For the side AB where PointA (0, 0) and PointB (s, 0), the calculation simplifies to:
- Distance(AB) = square_root((s - 0)^2 + (0 - 0)^2)
- Distance(AB) = square_root(s^2)
- Distance(AB) = s
Similarly, the other sides are calculated, resulting in each side being equal to s.
Perimeter and Area:
The Perimeter and Area are emergent properties of the square, derived from the side length.
Algorithm for Calculating the Perimeter of the Square:
The perimeter of a square is the sum of all four sides:
- Perimeter = 4 * SideLength
For the square, with SideLength = s, the perimeter is:
Perimeter = 4 * s
Algorithm for Calculating the Area of the Square:
The area of a square is calculated as:
- Area = SideLength * SideLength
For the square, with SideLength = s, the area is:
Angles:
The square’s angles are defined as 90 degrees between adjacent sides.
Algorithm for Verifying Right Angles (90 Degrees) Between Adjacent Sides:
Given two adjacent sides, represented as vectors (x1, y1) and (x2, y2), calculate the dot product:
- DotProduct = (x1 * x2) + (y1 * y2)
If the dot product is zero, the angle between the two sides is 90 degrees (perpendicular).
For example, for sides AB and BC:
- SideAB: vector (s, 0)
- SideBC: vector (0, s)
- DotProduct = (s * 0) + (0 * s) = 0
This confirms that the angle between the sides is 90 degrees.
Equality and Parallelism as Governing Relations:
The Equality and Parallelism relations govern the structure of the square, ensuring its geometric integrity.
Algorithm for Verifying Equality of Opposite Sides:
Two sides are equal if their lengths are the same.
For opposite sides AB and CD:
- Length(SideAB) = s
- Length(SideCD) = s
If Length(SideAB) = Length(SideCD), the sides are equal.
Algorithm for Verifying Parallelism of Opposite Sides:
Two sides are parallel if their slopes are equal. The slope of a line between two points (x1, y1) and (x2, y2) is:
- Slope = (y2 - y1) / (x2 - x1)
For sides AB and CD:
- SideAB: (0, 0) to (s, 0) → Slope = (0 - 0) / (s - 0) = 0
- SideCD: (s, s) to (0, s) → Slope = (s - s) / (0 - s) = 0
Since the slopes are equal, sides AB and CD are parallel.
- These relations can be thought of as part of a governance system that defines the square’s identity and behavior, ensuring that the entity maintains its shape and properties under various conditions.
Conclusion:
This NRTML representation encapsulates the geometric essence of a square and reflects how its structure is governed by relational constraints, such as Equality and Parallelism. These constraints do more than describe the square—they govern its form and ensure the consistent emergence of properties like Perimeter and Area from the base relations.
The Equality and Parallelism relations act as rules that enforce the square's geometric integrity, illustrating how the UCF/GUTT framework can represent entities where relationships define not only existence but also governance. The use of emergent properties further highlights how higher-order characteristics (such as area and perimeter) arise naturally from these governing relations.