GVGraphicView

GVGraphicView

Caracteristics of a graphic view

Constructor

new GVGraphicView()

Source:
Author:
  • Frédéric PIOU

Classes

GVGraphicView

Methods

addAngle(A, B, C)

Source:

Add the angle ABC to the graphic view

Parameters:
Name Type Description
A Point
B Point
C Point

addCircle(C, P) → {GVCircle}

Source:

Add a new circle center

Parameters:
Name Type Description
C GVPoint
P GVPoint
Returns:
Type
GVCircle

addIntersectLine()

Source:

Add intersect point of two lines in the view

addLabelsPointsPolygon(…args)

Source:

Add labels to the vertices of a polygon.

Parameters:
Name Type Attributes Description
args <repeatable>

addLine()

Source:

Add a new line to the view with new name

addNotAlignedPoint(P1, P2, P3) → {GVPoint}

Source:

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}

Source:

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}

Source:

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)

Source:

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>}

Source:

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}

Source:

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>}

Source:

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>}

Source:

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()

Source:

Add a new Segment to the view with new name

addSidesPolygon(…args) → {Array}

Source:

Add the sides of a polygon

Parameters:
Name Type Attributes Description
args any <repeatable>
Returns:
Type
Array

distance()

Source:

Give the distance between tow points, a point and a line, two lines

distanceMinSidesVertices(P1, P2, P3) → {number}

Source:

Distances to the sides of a triangle

Parameters:
Name Type Description
P1 GVPoint
P2 GVPoint
P3 GVPoint
Returns:
Type
number

getExtremPointGraphicLine()

Source:

Get the intersect point of a line and the bordure

getFigure() → {Mathalea2D}

Source:

Export to Mathalea2D

Returns:
Type
Mathalea2D

getLastNameNotUsed()

Source:

Search the last name not used and give a new name

getListObjectTypeSelect()

Source:

Give the list sorted of object with a given type

getNewName()

Source:

Give a new name

getNewPointBetween(point1, point2) → {GVPoint}

Source:

get a point between two points

Parameters:
Name Type Description
point1 GVPoint
point2 GVPoint
Returns:
Type
GVPoint

isCloseToExistingPoints()

Source:

Tempt to estimate if a point is close to the existing points

isCloseToLineThroughtExistingPoints()

Source:

Tempt to estimate if a point is close to the line through the existing point

resize()

Source:

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()

Source:

Zoom in or out