Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
|
|
@ -6,7 +6,7 @@ y = randomf * 100
|
|||
for i = 1 to 100000
|
||||
move x y
|
||||
rect 0.3 0.3
|
||||
h = randint 3
|
||||
h = random 3
|
||||
x = (x + x[h]) / 2
|
||||
y = (y + y[h]) / 2
|
||||
.
|
||||
|
|
|
|||
|
|
@ -1,33 +1,6 @@
|
|||
Note 'plan, Working in complex plane'
|
||||
Make an equilateral triangle.
|
||||
Make a list of N targets
|
||||
Starting with a random point near the triangle,
|
||||
iteratively generate new points.
|
||||
plot the new points.
|
||||
|
||||
j has a particularly rich notation for numbers.
|
||||
|
||||
1ad_90 specifies a complex number with radius 1
|
||||
at an angle of negative 90 degrees.
|
||||
|
||||
2p1 is 2 times (pi raised to the first power).
|
||||
)
|
||||
|
||||
N=: 3000
|
||||
|
||||
require'plot'
|
||||
TAU=: 2p1 NB. tauday.com
|
||||
mean=: +/ % #
|
||||
|
||||
NB. equilateral triangle with vertices on unit circle
|
||||
NB. rotated for fun.
|
||||
TRIANGLE=: *(j./2 1 o.(TAU%6)*?0)*1ad_90 1ad150 1ad30
|
||||
|
||||
TARGETS=: (N ?@:# 3) { TRIANGLE
|
||||
|
||||
NB. start on unit circle
|
||||
START=: j./2 1 o.TAU*?0
|
||||
|
||||
NEW_POINTS=: (mean@:(, {.) , ])/ TARGETS , START
|
||||
|
||||
'marker'plot NEW_POINTS
|
||||
NB. equilateral triangle with vertices on unit circle. rotated for fun.
|
||||
Triangle=: *1ad_90 1ad150 1ad30*j./2 1 o.(2p1%6)*?0
|
||||
Targets=: (?3000#3) { Triangle
|
||||
Start=: j./2 1 o.2p1*?0 NB. start on unit circle
|
||||
'marker' plot ((+/%#)@(,{.) , ])/Targets,Start
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue