1
Programs / Re: Intersection of two circles
« on: December 11, 2019, 04:24:45 pm »
Hey everyone,
Heres a WIP voronoi function.
Zep
Heres a WIP voronoi function.
Code: QB64: [Select]
- cirs = 25
- rad = 25
- NEXT n
- Dx = cirX(n) - cirX(x)
- Dy = cirY(n) - cirY(x)
- E = (Dx ^ 2 + Dy ^ 2 + r2 ^ 2 - r1 ^ 2) / (2 * rad)
- F = (-Dx ^ 2 - Dy ^ 2 + r2 ^ 2 - r1 ^ 2) / (2 * rad)
- a = Dx / E
- b = Dy / E
- c = Dx / F
- d = Dy / F
- ipX = cirX(n) + rad * cosalphap
- ipY = cirY(n) + rad * sinalpham
- ipX2 = cirX(x) + rad * cosbetap
- ipY2 = cirY(x) + rad * sinbetam
- NEXT n
- NEXT x
- rad = rad + 1
- PRINT "DONE"
Zep