Skip to navigation

Revs on the BBC Micro

Dashboard: wheelPixels

Name: wheelPixels [Show more] Type: Variable Category: Dashboard Summary: The number of pixels in the longest axis for the steering wheel line at various points in a quadrant Deep dive: Trigonometry
Context: See this variable in context in the source code References: This variable is used as follows: * UpdateDashboard uses wheelPixels

This table contains values that are used to calculate the coordinates of the end of the line on the steering wheel. The contents of the table are very close to the following (the values from the following calculation are shown in the comments below - they are close, but not quite a perfect match, so I haven't got this exactly right): FOR I%, 0, 37 EQUB INT(0.5 + 53 * COS((PI/4) * I% / 42)) NEXT This gives the length of the adjacent side of a right-angled triangle, with a hypotenuse of length 53, and an angle ranging from 0 to PI/4 (i.e. one eighth of a circle), split up into 42 points per eighth of a circle (so the table's 38 points cover just less than an eighth of a circle). In other words, if we have a clock whose centre is at the origin, then this table contains the x-coordinate of the end of a clock hand of length 53 as it moves from 3 o'clock to half past 4.
.wheelPixels EQUB 53 \ INT(0.5 + 53.00) = 53 EQUB 53 \ INT(0.5 + 52.99) = 53 EQUB 53 \ INT(0.5 + 52.96) = 53 EQUB 53 \ INT(0.5 + 52.92) = 53 EQUB 53 \ INT(0.5 + 52.85) = 53 EQUB 53 \ INT(0.5 + 52.77) = 53 EQUB 53 \ INT(0.5 + 52.67) = 53 EQUB 53 \ INT(0.5 + 52.55) = 53 EQUB 52 \ INT(0.5 + 52.41) = 52 EQUB 52 \ INT(0.5 + 52.25) = 52 EQUB 52 \ INT(0.5 + 52.08) = 52 EQUB 52 \ INT(0.5 + 51.88) = 52 EQUB 52 \ INT(0.5 + 51.67) = 52 EQUB 52 \ INT(0.5 + 51.44) = 51 (doesn't match) EQUB 51 \ INT(0.5 + 51.19) = 51 EQUB 51 \ INT(0.5 + 50.93) = 51 EQUB 51 \ INT(0.5 + 50.65) = 51 EQUB 50 \ INT(0.5 + 50.34) = 50 EQUB 50 \ INT(0.5 + 50.03) = 50 EQUB 50 \ INT(0.5 + 49.69) = 50 EQUB 49 \ INT(0.5 + 49.34) = 49 EQUB 49 \ INT(0.5 + 48.97) = 49 EQUB 48 \ INT(0.5 + 48.58) = 49 (doesn't match) EQUB 48 \ INT(0.5 + 48.17) = 48 EQUB 47 \ INT(0.5 + 47.75) = 48 (doesn't match) EQUB 47 \ INT(0.5 + 47.31) = 47 EQUB 46 \ INT(0.5 + 46.86) = 47 (doesn't match) EQUB 46 \ INT(0.5 + 46.39) = 46 EQUB 45 \ INT(0.5 + 45.90) = 46 (doesn't match) EQUB 45 \ INT(0.5 + 45.40) = 45 EQUB 44 \ INT(0.5 + 44.88) = 45 (doesn't match) EQUB 44 \ INT(0.5 + 44.34) = 44 EQUB 43 \ INT(0.5 + 43.79) = 44 (doesn't match) EQUB 42 \ INT(0.5 + 43.22) = 43 (doesn't match) EQUB 41 \ INT(0.5 + 42.64) = 43 (doesn't match) EQUB 40 \ INT(0.5 + 42.05) = 42 (doesn't match) EQUB 39 \ INT(0.5 + 41.44) = 41 (doesn't match) EQUB 38 \ INT(0.5 + 40.81) = 41 (doesn't match)