Classes
Members
axes
- Source:
GVLine[]
clipVisible
- Source:
number
geometric
- Source:
number
geometricExport
- Source:
GVGraphicObject[]
grid
- Source:
GVGraphicObject[]
height
- Source:
number
ppc
- Source:
string[]
ratio
- Source:
number
scale
- Source:
number
xmin
- Source:
GVLine[]
Methods
addAngle(A, B, C)
Add the angle ABC to the graphic view
Parameters:
Name | Type | Description |
---|---|---|
A |
Point | |
B |
Point | |
C |
Point |
addCircle(C, P) → {GVCircle}
Add a new circle center
Parameters:
Name | Type | Description |
---|---|---|
C |
GVPoint | |
P |
GVPoint |
Returns:
- Type
- GVCircle
addIntersectLine()
Add intersect point of two lines in the view
addLabelsPointsPolygon(…args)
Add labels to the vertices of a polygon.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
<repeatable> |
addLine()
Add a new line to the view with new name
addNotAlignedPoint(P1, P2, P3) → {GVPoint}
Add three points not aligned or one not aligned with the two others
Parameters:
Name | Type | Description |
---|---|---|
P1 |
GVPoint | If no point we create three new points |
P2 |
GVPoint | If no point we create three new points |
P3 |
GVPoint | If no point we create three new points |
Returns:
- Type
- GVPoint
addParallelLine(P, line) → {GVLine}
Add a parallel line to another one or two parallel lines
Parameters:
Name | Type | Description |
---|---|---|
P |
GVPoint | If no args we create two parallels |
line |
GVLine | If no args we create two parallels |
Returns:
- Type
- GVLine
addParallelogram(A, B, C) → {GVPolygon}
Add a group of 4 points making a parallelogram
Parameters:
Name | Type | Description |
---|---|---|
A |
GVPoint | // 0-3 point |
B |
GVPoint | // 0-3 point |
C |
GVPoint | // 0-3 point |
Returns:
- Type
- GVPolygon
addPoint(n, step)
Append new objects to the euclidean plan
Example
this.addPoint(2,0.5) --> Add two points with coordinates step 0.5 precision
Parameters:
Name | Type | Default | Description |
---|---|---|---|
n |
number |
1
|
Number of point to create |
step |
number | For coordinates |
addPointAligned(P1, P2) → {Array.<GVPoint>}
Add three point, two point or one point aligned to others
Parameters:
Name | Type | Description |
---|---|---|
P1 |
Point | // If no point or one point we creat new points |
P2 |
Point | // If no point or one point we creat new points |
Returns:
- Type
- Array.<GVPoint>
addPointBetween(A, B) → {GVPoint}
Add point between two but not too close to extrems
Parameters:
Name | Type | Description |
---|---|---|
A |
GVPoint | |
B |
GVPoint |
Returns:
- Type
- GVPoint
addRectPoint(…args) → {Array.<GVPoint>}
P1, P2, P3 with P2P1P3 rectangular in P1
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
<repeatable> |
Returns:
- Type
- Array.<GVPoint>
addRotate(center, angle, …args) → {Array.<Point>}
Rotate points
Example
this.addRotate(O, Math.PI()/2, B)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
center |
Point | ||
angle |
number | // Angle in radians |
|
args |
Point |
<repeatable> |
Returns:
- Type
- Array.<Point>
addSegment()
Add a new Segment to the view with new name
addSidesPolygon(…args)
Add the sides of a polygon
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
any |
<repeatable> |
Returns:
distance()
Give the distance between tow points, a point and a line, two lines
distanceMinSidesVertices(P1, P2, P3) → {number}
Distances to the sides of a triangle
Parameters:
Name | Type | Description |
---|---|---|
P1 |
GVPoint | |
P2 |
GVPoint | |
P3 |
GVPoint |
Returns:
- Type
- number
getExtremPointGraphicLine()
Get the intersect point of a line and the bordure
getFigure() → {Mathalea2D}
Export to Mathalea2D
Returns:
- Type
- Mathalea2D
getLastNameNotUsed()
Search the last name not used and give a new name
getListObjectTypeSelect()
Give the list sorted of object with a given type
getNewName()
Give a new name
getNewPointBetween(point1, point2) → {GVPoint}
get a point between two points
Parameters:
Name | Type | Description |
---|---|---|
point1 |
GVPoint | |
point2 |
GVPoint |
Returns:
- Type
- GVPoint
isCloseToExistingPoints()
Tempt to estimate if a point is close to the existing points
isCloseToLineThroughtExistingPoints()
Tempt to estimate if a point is close to the line through the existing point
resize()
Resize window of graphic view to the created points Keep the ratio
show()
- Source:
Show any Objects in Mathalea2D
Example
show(A,B,C,ABC)
zoom()
Zoom in or out