Solid Geometry
The All-in-One page is used to define 3D spatial objects (points, lines, planes, segments — "Solid Geometry" type in the Define area) and plot them with Matplotlib ("Solid Geometry mode" in the Plot area). Defined objects are stored in the main window's ljs dictionary ({name: (category, sympy object)}) and are shared with the "Solid Compute" computation type and the Plot area.
Defining Objects
In the Define area with the "Solid Geometry" type, choose a construction method, enter a name and parameters, then click Save (or press Enter) to create the object. Objects appear in the category list below, where you can Read (view name and equation / expression) or Delete them.
| # | Construction method | Parameters (comma-separated) | Category |
|---|---|---|---|
| 1 | 3D point (coordinates) | x, y, z |
Point |
| 2 | Line through two points | p1, p2 |
Line |
| 3 | Plane parallel to a given plane through a point | plane, point |
Plane |
| 4 | Plane perpendicular to a given line through a point | line, point |
Plane |
| 5 | Line parallel to a given line through a point | line, point |
Line |
| 6 | Perpendicular to a given line through a point | point, line |
Line |
| 7 | Line perpendicular to a given plane through a point | plane, point |
Line |
| 8 | Plane through a line and an external point | line, point |
Plane |
| 9 | Plane through two lines (intersecting or parallel) | line1, line2 |
Plane |
| 10 | Perpendicular foot from a point to a plane | point, plane |
Point |
| 11 | Perpendicular foot from a point to a line | point, line |
Point |
| 12 | 3D segment through two points | p1, p2 |
Segment |
Note
The object "name" is entered in the name input box (e.g. A, α); "point1" in parameters refers to the name of an already defined object. Coordinates accept SymPy expressions such as sqrt(2) or pi/2.
Property Panel
Select an object in the list and click Read to show its name and equation / expression (planes and lines show their equation; points show coordinates) in the property panel; click Delete to remove it.
Plotting
On the "Solid Geometry Plot" page, defined objects are shown as a checkable list (all checked by default). Check the objects you want to display and click Plot to render a 3D image with Matplotlib:
- Points, lines, planes, and segments can be displayed together; planes are rendered as semi-transparent grids.
- Each object is labeled with its name automatically.
- The 3D axes support mouse-drag view rotation; the toolbar provides Home / Pan / Zoom / Save.
- The image is re-rendered automatically when switching between light / dark themes.
It is implemented by draw3d in functions/paint3D.py. For calculations such as angles, distances, and volumes of these objects, use the "Solid Geometry Calculation" page — see Solid Geometry Calculation.
Example
- Define four points
A(0,0,0),B(1,0,0),C(0,1,0),D(0,0,1). - Use method 2 to create line
AB(parametersA,B). - Switch to the "Plot" page, check
A,B,C,D,AB, and click Plot to see the 3D points and line.
Tips
- Coordinate input follows the String Parsing standard.
- After defining objects, the "Solid Geometry Calculation" page offers 22 operations on them (distance, tetrahedron volume, etc.).