User Tools

Site Tools


en:chord

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:chord [2016/09/08 12:20]
admin
en:chord [2020/02/28 10:46]
Line 1: Line 1:
-===== Chord (Statement) ===== 
- 
-==== Format ==== 
- 
-**chord** [[numericexpressions|x_position]], [[numericexpressions|y_position]], [[numericexpressions|width]], [[numericexpressions|height]], [[numericexpressions|start_angle]], [[numericexpressions|width_angle]]\\ 
-**chord** ( [[numericexpressions|x_position]], [[numericexpressions|y_position]], [[numericexpressions|width]], [[numericexpressions|height]], [[numericexpressions|start_angle]], [[numericexpressions|width_angle]] )\\ 
-**chord** [[numericexpressions|center_x_position]], [[numericexpressions|center_y_position]], [[numericexpressions|radius]], [[numericexpressions|start_angle]], [[numericexpressions|width_angle]]\\ 
-**chord** ( [[numericexpressions|center_x_position]], [[numericexpressions|center_y_position]], [[numericexpressions|radius]], [[numericexpressions|start_angle]], [[numericexpressions|width_angle]] ) 
- 
- 
-==== Description ==== 
- 
-Draws an area bounded by an arc and chord (segment) of the circle or ellipse inside the rectangle defined by a bounding rectangle (defined by [[numericexpressions|x_position]], [[numericexpressions|y_position]], [[numericexpressions|width]], and [[numericexpressions|height]]) or by a square bounding a circle (defined by [[numericexpressions|center_x_position]], [[numericexpressions|center_y_position]], [[numericexpressions|radius]]).    The angles are defined from the 12 o'clock position in a clockwise direction in radians.  
- 
-As seen in the example below a chord may be used to draw a filled circle or an ellipse by defining the angular width to go all the way around (2*pi). 
- 
-==== Example ==== 
- 
-<code> 
-# chord_example.kbs 
-# 2012-12-29 j.m.reneau 
-# 
-# example of chord statement added on 0.9.9.25 
- 
-clg 
-color black 
-rect 140,50,20,150 
-color blue 
-chord 0,0,300,200,radians(-60), radians(120) 
-chord 100,175,60,50,radians(90),radians(180) 
- 
-color green 
-chord 200,200,25,75,0,pi*2 
-</code> 
-draws\\ 
-{{:chord_example.png|chord_example}} 
- 
- 
-==== See Also ==== 
-{{page>en:start#Graphics - Drawing&noheader}} 
- 
-==== History ==== 
-|0.9.9.25|New To Version| 
-|1.99.99.65|Added bounding square defined by circle| 
  
en/chord.txt ยท Last modified: 2020/02/28 10:46 (external edit)