An Example
The goal of this paper is to develop software for drawing Bernstein Globs. Remember them?
The first step for drawing an n-glob is to divide the perimeter of the unit circle into n equal segments by the points (say for 16 points)
>> n=16; >> t = 0:2*pi/n:2*pi >> circleNodes = [cos(t);sin(t)];
AC = tan(θ /2) =
tan((θ2
For the coordinates of the center of the perpendicular
circle, consider the lines tangent to the circle at We can then substitute for x and solve for y: This seems
justified by symmetry. Note also that
If you feel
compelled to verify that the distance from the center of the perpendicular
circle
Since a circle centered at (h, k) with radius R can be parameterized by In this case, we have expanded form for the parameterization of the perpendicular circle or, if you prefer, the more compact form using addition identities:
Suppose you just want to draw the portion of this circle either the inside or the outside the unit circle, you’d want to know what value of t corresponds to the point on the circle. This means solving equations like x(t) = cos(θ1): or If you want to use the Voyage 200 to solve this equation, be sure it’s in expanded form. As the two screenshots below attempt to demonstrate, instead of the simple sin-1(sin(θ1)), you get Go figure! for attempts this, it returns the following (not the “and” conditions are all met): which
suggests
Similarly, Well, I’ve
got some doubts about this now, so I turn to a simple example. Let θ1
= 0 and For what t does this circle intersect the unit
circle? The coordinates of
intersection are (1, 0) and
Here’s a little table of values:
…and the
Voyage 200 graph in
Let’s put it to the test in MatLab.
Here’re the m-files for the general x and y parametric functions
function y = ycoord(a1, a2, t) % the y-coordinate of a parameterized section of the circle % which intersects the unit circle orthogonally at polar y=(cos(a1)-cos(a2)+(1 - cos(a2-a1)).*sin(t))/sin(a2-a1)
function x = xcoord(a1, a2, t) % the xcoordinate of a parameterized section of the circle % which intersects the unit circle orthogonally at polar x=(sin(a2)-sin(a1)+(1 - cos(a2-a1)).*cos(t))/sin(a2-a1)
First, I plot the unit circle for reference:
>> figure >> hold on >> theta = 0:pi/36:2*pi; >> plot(cos(theta),sin(theta))
Then I fix the domain for the outnub of the blob and plot it:
>> t1=-pi/2:pi/100:3*pi/4; >>
plot(xcoord(0,pi/4,t1),
…and the beginnings of a blob takes shape:
Now suppose
we want to draw the inside the unit-circle arc (an innub, if you like) of a
circle orthogonal to the unit circle at
>> t2=5*pi/4:pi/100:7*pi/4; >> plot(xcoord(pi/4,3*pi/4,t2), >> t3=pi/4:pi/100:3*pi/2; >> plot(xcoord(3*pi/4,pi,t3),ycoord(3*pi/4,pi,t3),'g','LineWidth',2)
We continue in this style to draw the closed curve which forms a 3-blob: >> t4=7*pi/4:pi/100:5*pi/2; >> plot(xcoord(pi,5*pi/4,t4), >> t5=3*pi/4:pi/100:2*pi; >>
plot(xcoord(5*pi/4,3*pi/2,t5), >> t6=pi/2:pi/100:pi; >>
plot(xcoord(3*pi/2,2*pi,t6),
It’s then pretty straightforward to fit in the unit blobs to complete the 6-glob:
>> t7=theta; >>
plot(xcoord(pi/4,pi/2,t7), >> plot(xcoord(pi/2,3*pi/4,t7), ycoord(pi/2,3*pi/4,t7),'r','LineWidth',2) >> plot(xcoord(5*pi/4,3*pi/2,t7), ycoord(5*pi/4,3*pi/2,t7),'r','LineWidth',2) >> plot(xcoord(pi/4,pi/2,t7), ycoord(pi/4,pi/2,t7),'r','LineWidth',2) >> plot(xcoord(pi/2,3*pi/4,t7), ycoord(pi/2,3*pi/4,t7),'r','LineWidth',2) >> plot(xcoord(5*pi/4,3*pi/2,t7), ycoord(5*pi/4,3*pi/2,t7),'r','LineWidth',2) >> plot(xcoord(pi/4,pi/2,t7), ycoord(pi/4,pi/2,t7),'r','LineWidth',2) >> plot(xcoord(pi/2,3*pi/4,t7), ycoord(pi/2,3*pi/4,t7),'r','LineWidth',2) >> plot(xcoord(5*pi/4,3*pi/2,t7), ycoord(5*pi/4,3*pi/2,t7),'r','LineWidth',2) >> plot(xcoord(pi/4,pi/2,t7), ycoord(pi/4,pi/2,t7),'r','LineWidth',2) >> plot(xcoord(pi/2,3*pi/4,t7), ycoord(pi/2,3*pi/4,t7),'r','LineWidth',2) >> plot(xcoord(pi,5*pi/4,t7), ycoord(pi,5*pi/4,t7),'r','LineWidth',2) >> plot(xcoord(3*pi/2,7*pi/4,t7), ycoord(3*pi/2,7*pi/4,t7),'r','LineWidth',2) >> plot(xcoord(7*pi/4,2*pi,t7), ycoord(7*pi/4,2*pi,t7),'r','LineWidth',2)
I took the liberty of filling the blobs to make a more pleasing glob show:
Miscellaneous notes:
To be sure,
if cos(t) =
But I’m
thinking there’s a better approach here.
Let’s look at the simple case of the circle which intersects the unit
circle orthogonally at A(1,0) and
at B(cos(θ), sin(θ)). In the
diagram below, you can see that the center of this circle is at the
intersection of the lines tangent to the unit circle at A and B. The equations of these tangent lines are x = 1 and The circle
is centered at (h, k) = or Rotating
this circle through some multiple of θ can be obtained by multiplying the
(x,y) vector by the rotation matrix
Well that doesn’t seem so great… |