Sunday 13 January 2013

Designing Wooden Model Wire Wheels (Part 2)

The wire wheels that I see on Morgans have the spokes that attach to opposite ends of the hub cross between each other before they attach to the rim. This is a little more complex than the motorcycle style wheels I made for the 3 Wheeler model ( where all the spokes attach to the rim along its centre line. In my POVray model for designing the wheel I'll put in a value to set how far from and to which side of the centre line the spokes will attach to the rim.

When I designed the 3 Wheeler's wheels I did a lot of fiddling with the positioning of where the spokes go into the hub.  Since this time I will be fiddling with the rim end already I decided to calculate where the spoke should go in the hub.  The objective is to put the spoke as near as possible to the end of the hub without letting the hole for holding the tip of the spoke go through the end of the hub. 

In the following picture the black coordinate system is the one POVray will use when building the wheel.  I also added a second set of coordinates in red to make life easier while calculating the y coordinates of the ends of the spokes.  The red system's y-axis goes through the point where a spoke enters the hub, like we calculated last week.  The whole system is rotated so the x-axis crosses the point where the spoke enters the rim, also calculated last week.  Then the coordinates are shifted up or down in the y direction as required to have the x-axis enter the rim at the same point the topside of the spoke enters the hub.  We use the side of the spoke here not its centre line as the side will be first to reach the end of the hub.

Here is a cut-away to show how the red coordinates line up with the spoke.

What I want to calculate is the angle between the spoke and the x-axis.

I know the distance from the origin to where the x-axis enters the rim, apply the Pythagorean theorem to the points calculated last week.  Call it d.

I will set the depth of the hole in the hub for the tip of the spoke.  Call it t.

And for each run I will enter the y coordinate for where the top side of the spoke enters the rim.  Then the distance from the origin up the y-axis to the top of the hub is one half the distance between the ends of the hub minus the input value of y for the spoke at the rim.  Call it h.

The next diagram takes the x-y plane from the red coordinates in the cut-away diagram and adds in a short segment of the line across the end of the hub, line y = h, and the line along the top side of the spoke, line ACB.  Under it is the derivation of a trigonometric formula for the angle of the spoke.

I labeled the picture of the wheel with the points in the geometry diagram.

A - is on the inside of the rim where the top of the spoke enters the rim
B - is on the face of end of the hub where the spoke would break out of the hub
D - is at the outer circumference on the end of the hub
C - is on the side of the hub where the top of the spoke enters the hub
O - is on the side of the hub, its distance from the end of the hub is variable as I try different amounts of cross over between the outside and inside sets of spokes.  It is input as the y coordinate in the POVray coordinates where the top side of the spoke enters the rim.

The distance from O to A we have from last week's work.  We calculated the coordinates of the spoke's end points on the plane, use the Pythagorean theorem to calculate the distance, 'd', between them.
  d = SQRT((Xrim - Xhub)^2 + (Zrim - Zhub)^2)

The distance from O to D is one half the hub length minus the y coordinate of the offset at the rim.  If the offset is to -1/8" and the hub is 1/2" long then this height , h = 1/2 * 1/2 -(-1/8) = 3/8".

The distance B to C, t, is set to 1/32".

What I'm after is the angle OAC which will also be needed in designing the jig for drilling the spoke holes.  I think I've broken down the steps fine enough in the diagram for you to follow how I got my formula for the angle.  Lets rename angle OAC as just 'a' so the formula reads:

    d * tan(a) + t * sin(a) - h = 0

I poked around on and some other math sites for a solution to this equation but trigonometric equations do not often have easy solutions.  This was not one of the easy ones.  Having been programming computers for over 40 years I thought of building a binary search program, but in case there was something better I asked for help on the Google group mog-group.  Brent Meeker responded with two possibilities.  The first idea involved using some trigonometric transformations to eliminate the tan(a) and turn this equation into a quartic equation in sin(a).  After looking at the Wolfram site's instructions for solving a quartic equation I had to agree with Brent that this is not the way to do it.  His better idea is an iterative approach called, fixed point iteration. 

Starting with the fact that tan(a) = sin(a)/cos(a) Brent reworked my formula to calculate the error in a guess of the answer.  Here I just paste his explanation.

Instead guess a value of a and solve for the amount of error e in your guess. First multiply thru by cos so you have

d*sin(a) - h*cos(a) + t*sin(a)cos(a) =0

or using a trig identity

d*sin(a) - h*cos(a) + 0.5*t*sin(2a) =0

Then substitute in your guess which is (a-e)

d*sin(a-e) - h*cos(a-e) + 0.5*t*sin(2a-2e) =0

or using trig identities

d*[sin(a)cos(-e)+cos(a)sin(-e)] - h*[cos(a)cos(-e)-sin(a)sin(-e)] +

And then here's the payoff. For small angles e, sin(e)=e and cos(e)=1.  So you assume you're close and e is small so the above equation becomes

d*[sin(a) -e*cos(a)] - h*[cos(a)+e*sin(a)] + 0.5*t*[sin(2a)-2e*cos(2a)]=0

Which you easily solve for e.

e={d*sin(a) - h*cos(a) + 0.5*t*sin(2a)}/{cos(a) + h*sin(a) +t*cos(2a)}

You add this value to your estimate, which was a-e, and you will have a new value much closer to the true value of a. Take this new value as a new guess and repeat the above calculation of a new e.  This should converge very quickly to as much accuracy as you need.

I tried this in a spreadsheet with d = 0.5, h = 0.35, t = 0.03, and a first guess of 45 degrees.  But I found I needed to subtract e from the guess not add, maybe because POVray's angles turn backwards to the mathematical convention.

a                e
45               17.8768435793
27.1231564207    2.2868135347
24.836342886     0.4709482886
24.3653945974    0.0993094122

It homed in to greater accuracy than any protractor I have in just 4 steps.  And it can be coded in a simple while loop containing just two lines of code.

Now that I have the angle a, we can find the point C, it is t * sin(a) in from the end of the hub.  But to draw this spoke we need its centre line, line AC is on the side of the spoke. 

Adding the spoke centre line to the diagram we can calculate how far it is down to the centre.

The centre line is {Spoke Radius / cos(a)} below the line AC.

Now we can calculate POVray's Y coordinates for the spoke.  At the hub it will be

Yhub = 0.5 * Hub Width - t * sin(a) - Spoke Radius / cos(a)

At the rim it will be

Yrim = The input Offset from Centre - Spoke Radius / cos(a)

Of course the spokes on the other side of the hub will have some signs changed.  At the hub it will be

Yhub = -0.5 * Hub Width + t * sin(a) + Spoke Radius / cos(a)

and at the rim

Yrim = The input Offset from Centre + Spoke Radius / cos(a)

Now we have the x, y, and z coordinates for the ends of the outer sets of spokes.  The inner sets which cross behind the outer ones will have the same angle to the plane of the wheel as their pair mates.  To avoid hitting their mates they must be inset by at least:

 Spoke Diameter / cos(a)

This amount works OK for the spokes on the narrow end with their shallow angle but I had to increase the inset on the other end's more steeply angled spokes, 1.1 times did the trick.  POVray's intersect function clearly shows where any spokes intersect.  After playing with the offsets at the rim to get no intersect pieces showing I removed the intersect function to make the following stereoscopic picture of the wheel.

Look through this picture to merge the images and get the 3D effect.  It may help to thumb your nose at the picture so each eye see only the image on its side and/or shrink the picture's window a little.  

I see I will have to bevel the corner where the hub widens so the spokes from the narrow end can clear it.

Saturday 5 January 2013

Designing Wooden Model Wire Wheels (Part 1)

Instead of bearing down and getting done cleaning up the finish on the DHC I've been working on a design for the next set of "wire" wheels.  My daughter saw what I was doing while here visiting over Christmas and told me I should post the calculations on the blog.  So here is why I studied math in high school.

For two reasons I decided to separate the wheels from the tires in this design.  One, it lets me use a white hardwood for the wheel and a dark wood for the tires.  Two, the wider tire profile used on more recent cars would cause the spoke holes to exit the sides of the tire at a shallow angle which could made drilling awkward.  The wire wheel I chose to model has a hub with different diameters at opposite ends and twice as many spokes on the large end as on the small end.  In the POVray model I built a hub with a 3/8" diameter axle hole and scaled the rest of the hub around that hole.  The rim diameter was scaled to fit in a 2 1/2" diameter tire.

This week I'll just develop the two dimensional weaving pattern of the spokes.  The example I'm using has 48 spokes, this is the smallest number that has all the spokes angling into the hub and not just grazing the surface.

On the hub's large diameter end we have 32 spokes.  Draw 32 radii around the wheel.  To be able to use symmetry to get the second set of spokes rotate the radii one half of the angle between two adjacent radii so the x and y axes bisect the angle between radii.

On the real wire wheels each spoke on the large end of the hub crosses three other spokes from the large end before it reaches the rim.  The relatively fatter wooden spokes on the model would not fit across three others so I tried two.  Therefore, a spoke at one radius line on the hub will attach to the rim two radii away from its hub radius.

Calling the angle between two adjacent radii a, the hub radius h, and the inside rim radius i, we can calculate the end points of the spokes (Xh, Yh) at the hub and (Xr, Yr) at the rim. 
POVray has angles increase in the clockwise direction, opposite to the convention in geometry. Measuring the angle from the twelve o'clock position.

For the spoke angling up to the right:
Xh = h * sin(0.5*a)
Yh = h * cos(0.5*a)
Xr = i * sin(2.5*a)
Yr = i * cos(2.5*a)

By symmetry the ends of the spoke angling to the left are (-Xh, Yh) and (-Xr, Yr).

With the POVray model I do not need to calculate for all the spokes. I can rotate this pair around the centre to fill in the wheel.

The small end of the hub has 16 spokes and each spoke crosses one other spoke.  Therefore, the angle between these radii is two times the angle between the radii on the large end, i.e 2*a.

For the spoke angling up to the right:
Xh = h * sin(-a)
Yh = h * cos(-a)
Xr = i * sin(a)
Yr = i * cos(a)

By symmetry the ends of the spoke angling to the left are (-Xh, Yh) and (-Xr, Yr).

Rotating this pair around the wheel we get;

Put the large end spokes together with the small end spokes;

If I wanted to get real ambitious here is a 60 spoke wheel;

Next week I'll add the third dimension, calculating the angle the spokes make with the plane of the wheel.

2013 Fleetwood Country Cruize

Click on screen capture to enlarge.

The Fleetwood Country Cruize, held annually on the Steve Plunkett estate on the western edge of London, Ontario, is set to get under way on Friday, June 7th. That first night Plunkett is presenting four rock acts, all steeped in '60s memories:

  • Paul Revere and The Raiders
  • Mary Wilson of The Supremes
  • The Association
  • and Mitch Ryder (who gained fame backed by the Detroit Wheels)

Tickets to the kick off party are $59 per person with the gates opening at 6 pm. The first act hits the stage at 7 pm. There will be food plus beer and wine available. Rain is no threat as the event is held under a big top.

Saturday, Plunkett hosts the biggest classic-car cruise event in Canada. With the gates opening at 7 am, more than 3000 vintage cars are expected to fill Plunkett's backyard. As in years past, Amphicars will be taking folk for a short rides across the Plunkett backyard pond. The entry fee is $10 per passenger.

If past years are any indication, there will be a short airshow presented by a local heritage aircraft club.

The Classic Cadillac Museum and the V-16 Auto Salon will be open. This museum is a must see, ask John Roden. There is also a steel building filled with nicely restored old Cadillacs. These are the second-string Cadillacs in the amazing Plunkett collection.

Saturday night there will be dinner and a show under the big top, with the headliner this year being Bobby Vinton. Dress is casual and there will be a cash bar serving both beer and wine. Tickets are $89 per person.

Sunday there is a repeat of the car show but my guess is that it will be but a shadow of the Saturday event. I'm betting most folk will be heading home either Saturday evening after the show or Sunday morning.

If the club is interested, Ken and Judy Wightman will act as liaison for this event.