A journey and a method for drawing spheres

8 min read Original article ↗

Refik Turkeli

How I used math to find a method for drawing rotated spheres accurately by hand.

(you can scroll down for the method)

The Journey

After I got interested in drawing with pencil, a friend of mine introduced me to Andrew Loomis’ wonderful book called “Fun With A Pencil” to help me.

The book starts with introducing the idea that one can draw any complicated shape out of simpler ones. For example, you can start drawing a head by first drawing a sphere. Then, you can add your lines on top of this sphere and create your final drawing.

The next step is to draw the sphere. The sphere can be rotated from any axis. Drawing on differently rotated spheres would create heads looking at different directions.

Andrew Loomis’ sphere examples

I was surprised to find out that I was terrible at imagining how lines on a sphere would look like after a rotation.

My sphere drawing

Since I like to figure things out by myself, I decided to discover the math behind those lines. I thought that if I can figure out the math, I would have a better chance of drawing them.

First I explored what happens to point A, when the sphere is rotated around the X axis.

This was easy. To find out how much A would move upwards, I looked at the sphere directly from X axis.

So if the sphere turns α degrees around X axis, point A would go up by sin(α) * r.

It was a very tedious task to draw and make accurate tests of my findings by pen, paper and ruler. So I decided to write a program for it. The easiest way to go about that seemed to be using HTML5 canvas and Javascript.

HTML5 canvas requires cartesian coordinates for drawing points. From my brief interest in astronomy, I knew a more convenient way of addressing points on a spherical surface. It is the way stars are addressed. It is done by making use of two angles: ascension (a) and declination (d).

Point B can be addressed by these two angles. Consider a meridian passing from point B. Ascension (a) is the angle between this meridian and Z axis. Declination (d) is the angle between B and Y axis.

Say you want to draw the meridian that passes through B. You can address all the points on that meridian like this: (ascension: a, declination: 0 to 360).

Even though I knew the points addresses in terms of ascension and declination, I still had to draw them on a canvas. I needed a way to convert my spherical coordinates to cartesian coordinates.

Spherical coordinate to cartesian coordinate

Now that I can draw any point on the sphere, I needed to know how the coordinates would change after a rotation. My initial finding of sin(α) * r was not a generic formula that can be applied to all coordinates.

I figured that if the rotation is done on X axis, than the coordinates X component won’t change. This is true for any rotation on any axis. Starting from this notion, I worked on a rotation on Z axis.

Point A has the angle α with the X axis. It will travel on a circular path and the final angle it will have with X axis will be α + β after β amount of rotation on Z axis.

This is the math behind how any coordinates new values can be calculated after a rotation of β.

My programs sphere

After putting all of this in code, it worked wonderfully. You can play with it and read the code on this page.

It felt good to figure it out. However, I still needed a practical way to make the drawing by pen since I cannot make all those calculations on each of my drawings.

I started with the idea that any sphere drawing will have the top of the Z axis somewhere on the circle. Picking that point on a circle means picking a rotation for first Z and then X axis.

Picking a point for the top of the Z axis also determines the top of the Y axis. I searched for a practical way for determining the position of Y axis using the Z axis.

I can determine “m” by looking at the distance between center of the circle and the point I picked for the top of Z axis. What I needed was a practical way to determine “n”, the distance between the edge of the circle and top of the Y axis.

By practical, I mean a way that doesn’t require calculations. So I hoped to find a way that will give me a relative answer. Something like a proportion of another measure that I can estimate with my eye.

I found “n” in terms of “m”. To get a feel for it, I ignored the product “r” at the end of the equation and plotted for different values of m/r.

The graph turned out to be a circle. I felt that I can exploit this somehow. Rather than finding m/r in my drawing and plugging it to this equation, I had something simpler in mind.

Since the equation for “n” has a product “r” at the end, this graph will become identical to the circle that will be drawn for the sphere. Drawing a tangent to that circle and making its length equal to “m” would be the same as calculating m/r and plugging it to the graph. This is demonstrated on “The Method” sections step 3 to 6.

Finding “n” (CF) from “m” (AB)
Path of Y axis during a rotation around Z axis

Having the top of Z and Y axis, the next variation on the sphere can be another rotation on the Z axis. This won’t change the position of the Z axis, but it will change the position of Y axis. Top of Y axis would travel along an ellipse and that ellipses shape won’t change.

To create this variation, I first drew the ellipse going through Y axis and than picked a point somewhere on it. This is demonstrated on “The Method” sections step 9 to 11.

Picking a point for the head of Y axis (J). It was at F before.

To draw the rest of the sphere, I observed and recorded patterns of rotated spheres in the program I wrote. Lines for XY, YZ and XZ planes become ellipses on a sphere after a rotation. My main observation was that X axis divides YZ, Y axis divides XZ and Z axis divides XY plane ellipses from the middle.

All ellipses centers are the same with the center of circle. I knew the points ellipses meet with the circle by drawing a perpendicular line to the axis line that divides it in the middle. I also knew additional 2 points on the ellipse since the top of axes are on it. This information is enough for drawing the ellipse. An example is on “The Method” sections step 15.

Overview of the method

The method I developed with these observations is explained in detail below.

The Method

This is an example. You can draw spheres rotated differently by making changes in steps 2 and 11.

Step 1

Start with a circle. Center of the circle is A.

Step 2

Pick a point somewhere inside the circle. It is B.

Step 3

Join A and B by a line and extend that line. The point where it meets the circle is C.

Step 4

Draw a line perpendicular to AC. It should start from C and its length should be equal to AB. End of that line is D.

Step 5

Draw a line starting from D and is parallel to AC. The point it meets the circle is E.

Step 6

Draw a line starting from E and is parallel to CD. The point it meets AC is F.

Step 7

Clean except AB, F.

Step 8

Draw a line perpendicular to AB, it should pass from A. Extend it in both directions. The points that meet the circle are G and H.

Step 9

Join F and A by a line and extend it from A by the length of AF. End of that line is I.

Step 10

Draw an ellipse that passes through F, H, I and G. Make the half passing through I, bold.

Step 11

Pick a point on curve GFH. It is J.

Step 12

Clean except A, B, J and I

Step 13

Join J and A by a line and extend it. The point it meets the ellipse is K.

Step 14

Join A and B by a line. Extend it for the length of AB. End of that line is L.

Step 15

Draw a line perpendicular to JK. Points that meet the circle are M and N. Draw an ellipse through B, N, L and M.

Step 16

Make half of the ellipse that passes from B bold.

Step 17

Intersection of the two ellipses are O and P, join them by a line.

Step 18

Draw a line that passes from A and is perpendicular to OP. Points that meet the circle are Q and R.

Step 19

Draw an ellipse that passes through Q, B, K, R, L and J. Make the half that is passing through B, bold.

Step 20

Clean except the ellipses and its complete.

Improving the accuracy of ellipses would have a positive effect on the outcome. It requires some practice.

I used a ruler for drawing the example to make the steps more clear. A ruler isn’t necessary though. I’ve implemented this method many times and I can say that its possible to draw hard to imagine spheres quickly, without any tools and calculations.

It was a fun journey. I am happy that something useful came out of it. I haven’t been able to find anything similar to my method anywhere. I hope that someone will benefit from it.

I’m glad that they taught us trigonometry in high school ☺