Calculate points of Koch Curve

2.1k Views Asked by At

I'm having struggles with what I believe to be simple trig equations to find the points of the little triangle on the base segment of a koch curve.

If we divide the line segment up into 5 points where point 1 (A) and 5 (B) are the start and end points (both known), how do I calculate the three remaining points?

I know that point 2 and 4 are 1/3 and 2/3 of the total length of AB, but when I do my calculations it appears that both the x and y coordinates of those points are also 1/3 and 2/3 respectively. I find that strange.

points on koch curve

For the 3rd point I'm using vector rotation by simply rotating point 2,4 up by 60 degrees. Not sure if that is correct

1

There are 1 best solutions below

0
On BEST ANSWER

let $P_1=[{a \atop b}]$, $P_5=[{c\atop d}]$ be the end points, then $P_2=(2P_1+P_5)/3$ and $P_4=(P_1+2P_5)/3$. To get $P_3$ you need to apply trig to rotate your segments by 60 degrees. For example you can define counter-clockwise rotation matrix R

$R=\left( \matrix{ \cos(60) & -\sin(60)\cr \sin(60) & \cos(60)\cr }\right)$

then $P_3=P_2+R(P_4-P_2)$.