Difference between revisions of "RandomPointIn Command"
From GeoGebra Manual
m (Text replace - ";(.*)\[(.*)\]" to ";$1($2)") |
m (Creates a random point inside given polygon or (full) conic.) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|list}} | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|list}} | ||
;RandomPointIn( <Region> ) | ;RandomPointIn( <Region> ) | ||
− | Creates a random point inside given polygon or conic. | + | Creates a random point inside given polygon or (full) conic. |
;RandomPointIn( <List of Points> ) | ;RandomPointIn( <List of Points> ) | ||
Returns a random point inside the polygon with given vertices. | Returns a random point inside the polygon with given vertices. | ||
− | {{example|1=<code>RandomPointIn | + | {{example|1=<code>RandomPointIn(Polygon(A,B,C))</code> and <code>RandomPointIn(A,B,C)</code> both give random point inside triangle ABC.}} |
To get a random point that belongs to the list use [[RandomElement_Command|Random Element]] instead. | To get a random point that belongs to the list use [[RandomElement_Command|Random Element]] instead. | ||
;RandomPointIn( <xMin>, <xMax>, <yMin>, <yMax> ) | ;RandomPointIn( <xMin>, <xMax>, <yMin>, <yMax> ) | ||
Creates a random point with x-coordinate from interval [xMin,xMax] and y-coordinate from interval [yMin, yMax]. | Creates a random point with x-coordinate from interval [xMin,xMax] and y-coordinate from interval [yMin, yMax]. |
Latest revision as of 17:38, 2 November 2017
- RandomPointIn( <Region> )
Creates a random point inside given polygon or (full) conic.
- RandomPointIn( <List of Points> )
Returns a random point inside the polygon with given vertices.
Example:
RandomPointIn(Polygon(A,B,C))
and RandomPointIn(A,B,C)
both give random point inside triangle ABC.To get a random point that belongs to the list use Random Element instead.
- RandomPointIn( <xMin>, <xMax>, <yMin>, <yMax> )
Creates a random point with x-coordinate from interval [xMin,xMax] and y-coordinate from interval [yMin, yMax].