Computer graphics is a defining application for computational geometry.
The
interaction between these fields is explored through two scenarios. Spatial
subdivisions studied from the viewpoint of computational geometry are shown to
have found application in computer graphics.
Computer graphics deals with generating images and art with the aid of computers.
Computer graphics is a core technology in digital photography, film, video games,
digital art, cell phone and computer display, and many specialized applications. A
great deal of specialized hardware and software has been developed, with the
displays of most devices being driven by computer graphics hardware.
Formal Methods Used
• Z-Notation and B-Method:
o For specifying spatial systems or interactions in CAD, robotics, or
game engines.
• Alloy and TLA+:
o For specifying geometric constraints in distributed systems.
• Theorem Provers:
o Tools like Coq or Isabelle are used to formally verify geometric
algorithms.
How formal methods are related to computer graphics?
Formal methods and computer graphics intersect in various ways, particularly in
areas where precision, correctness, and verification of graphical systems are critical.
The relationship between the two can be understood through their contributions to
modeling, specification, verification, and implementation of graphical systems.
Applications of Formal Methods in Computer Graphics
Domain How Formal Methods Are Used
Game Ensuring collision detection and physics simulations are
Development robust and error-free.
Formal verification of environment interactions and
Simulation and VR
rendering correctness.
Domain How Formal Methods Are Used
Specifying and verifying motion planning and geometric
Robotics and CAD
design constraints.
Ensuring reconstruction and visualization algorithms are
Medical Imaging
precise and meet regulatory standards.
Education and Teaching formal methods through visual tools; using graphics
Research to represent mathematical models.
Line Segment:
In geometry, a line segment is a part of straight line that is bounded by two distinct
end points, and contains every point on the line that is between endpoints
.
Endpoints
• Endpoints are the two distinct points that define a line segment.
• Example: Consider a line segment AB, where A (2,3) and B (4,5) are the
endpoints.
Length
• The length of a line segment is the distance between its endpoints.
• Example: Using the same line segment AB, the length can be calculated using
the distance formula:
√((4-2)² + (5-3)²) = √(2² + 2²) = √(8) = 2.83
Orientation
• The orientation of a line segment is the direction in which it points.
• Example: Consider a line segment AB, where A (2,3) and B (4,5) are the
endpoints. The orientation of this line segment is from point A to point B.
Convexity
• A line segment is a convex set, meaning that it contains all the points between
its endpoints.
• Example: Consider a line segment AB, where A (2,3) and B (4,5) are the
endpoints. Any point on the line segment AB, such as point C (3,4), is
considered part of the convex set.
Building Blocks
• Line segments are the basic building blocks of more complex geometric
objects.
• Example: A triangle can be formed by connecting three-line segments, such
as AB, BC, and CA.
Intersection and Collision Detection
• Line segments are used to detect intersections and collisions between
objects.
• Example: In a game, two-line segments (representing the edges of two
objects) can be checked for intersection to determine if the objects have
collided.
POINT:
• In geometry, a point is an abstract idealization of an exact position, without
size.
• When we try to show directions to a friend using pen and paper, we simply
draw dots and name them to show the location of the benchmarks and the
destination for our convenience. Similarly, a point in math (or, in geometry, to
be specific) is a tiny dot used to show a location in space.
Types of Points
There are different types of points in geometry:
▪ Collinear Points
Collinear means something in the same line. Three or more points are said to be
collinear if they lie on a single straight line.
Key Characteristics of a Point
1. No Dimensions:
o A point has no length, width, or height—it is zero-dimensional.
o It only indicates a specific position in space.
2. Representation:
o A point is often denoted by a single capital letter (e.g., A, B, PA, B,
PA, B, P).
o In a coordinate system:
▪ A point in 2D is represented as (x,y)(x, y)(x,y).
▪ A point in 3D is represented as (x,y,z)(x, y, z)(x,y,z).
3. Abstract Concept:
o A point is an abstract idea with no physical size or shape.
o It serves as a building block for defining more complex geometric
objects like lines, planes, and shapes.
Roles of Points in Geometry
1. Defining Shapes:
o Points are used to define lines, angles, triangles, polygons, and other
shapes.
o Example: A line segment is defined by two points AAA and BBB.
2. Reference in Space:
o Points act as reference locations in coordinate systems (Cartesian,
polar, etc.).
3. Intersection:
o The meeting point of two lines or curves is often a point.
4. Vertices:
o Points serve as the corners or vertices of polygons and polyhedral.
Examples in Geometry
1. On a Line: The midpoint of a line segment is a point that divides it into two
equal parts.
2. On a Plane: A triangle is defined by three points in a plane.
3. In 3D Space: A point (x,y,z)(x, y, z)(x,y,z) defines a position in three-
dimensional space.
Visual Representation
Though a point has no size, it is often depicted as a dot or a small mark for
visualization purposes. For example:
• A 2D point P(3,4)P(3, 4)P(3,4) is shown as a dot on a graph at 3 units on the
x-axis and 4 units on the y-axis.
Summary
In essence, a point is an exact location in space, without size, dimension, or
physical properties. It is one of the most fundamental elements in geometry.
CONTOUR:
• An outline, especially one representing or bounding the shape or form of
something.
• . It represents a closed curve or line that defines the visible edge or perimeter
of an object in a 2D or 3D space. Contours are often used for various purposes
in graphics and computational applications.
➢ Z-Notation for Contour
z
Copy code
[Point]
Contour
points: seq Point
isClosed: ℙ
∀ i, j: ℕ | i ≠ j ∧ i, j ∈ dom points • points(i) ≠ points(j)
isClosed ⇔ (head points = last points)
Explanation:
1. Point: Represents a 2D point (e.g., (x,y)(x, y)(x,y)).
2. Contour: Defined as:
o A sequence of points (points: seq Point), which may form a continuous
curve.
o A property (isClosed) indicating whether the contour is closed.
3. Constraint:
o No duplicate points unless isClosed is true, and the first and last points
are identical for closed contours.
POLYGON:
A polygon mesh is a type of computer graphics technique used for creating 3D
models. It is a collection of vertices, edges and faces that define the shape and surface
of a 3D object. It is often used in computer games, animation, virtual reality, and
computer-aided design (CAD).
Uses of Polygon
• Polygon has a wide range of applications in computer graphics. It can be
used to represent a variety of shapes, from simple cubes to complex
characters. The polygon can be manipulated to create realistic images,
animations, and simulations.
• Polygon can be used to create 3D models for games and films. The polygon
can be modified to create realistic characters and environments. It is also used
in virtual reality applications, as it allows users to interact with a 3D
environment.
• Polygon can also be used to create 3D printing models. The polygon can be
manipulated to create intricate designs for 3D printing.
KEY DIFFERENCES BETWEEN CONTOUR AND POLYGON
Aspect Contour Polygon
Composed of only
Shape Can include curves or be irregular.
straight-line segments.
Closure Can be open or closed. Always closed.
Not explicitly defined as corners; may be Defined by a finite set of
Vertices
a continuous curve. vertices.
Aspect Contour Polygon
May require interpolation or parametric Simple, based on vertices
Complexity
equations for smooth curves. and edges.
Triangle, rectangle,
Examples Circle outline, organic shapes.
hexagon.
Z-Notation for Polygon
[Point]
Polygon
vertices: seq₁ Point
∀ i, j: ℕ | i ≠ j ∧ i, j ∈ dom vertices • vertices(i) ≠ vertices(j)
head vertices = last vertices
Explanation:
1. Polygon:
o Defined by a non-empty sequence of vertices (seq₁ Point), where the
vertices are distinct.
o Always closed, enforced by the condition head vertices = last vertices.
2. Constraint:
o No duplicate vertices (except the closure of the polygon where the first
and last vertices are the same).