-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
executable file
·41 lines (30 loc) · 1.45 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
* Allow circles to have labels like :C1, not just :C
* Consider whether arcs should be allowed to have labels.
They do at the moment, just like circles. But it seems
unnecessary.
* Consider refactoring such that Circle < Arc. A circle
really is a special case of an arc, where the angles are
0 and 360 degrees!
* Enable the creation of *groups* of objects which can then be copied and
transformed.
* Consider the area of a circle as a bunch of rectangles, like so
-- We would want to mark the lengths 2(pi)r
------ along the bottom and r up the left side.
---------- As the rectangles get thinner, this approaches
-------------- a triangle. A = 0.5 * 2(pi)r * 5 = (pi)r^2
To create the diagram:
rects = (0..3).map { |i|
base = 8 - 2*i # 8, 6, 4, 2
rectangle :base => base, :height => 1, :centre => ( p(0,0) + i*v(0,1) )
}
a, b, c, d = Shape.bounding_box(rects).points
mark_length :segment => [a,d], :style => :architectural, :padding => 0.5,
:text => 'r'
mark_length :segment => [a,b], :style => :architectural, :padding => 0.5,
:text => '2(pi)r'
Some good ideas in there:
* Creating rectangles with a _centre_
* Accessing the bounding box for a group of objects
* Marking lengths
* Access to objects via their labels like Circle[:K].
- Does this exist already?