A math challenge...
StaticRect (x1, y1), (x2, y2), z
Where x1 and y1 are coordinates on a Cartesian coordinate plane, x2 and y2 are lengths and widths of the rectangle, respectively, and z is the rotation of the brick. The brick is positioned with respect to it's center; i.e. it's center is positioned with x1 and y1. It's mathematically possible; it's just very confusing for a 7th grader. With a little calculus, trigonometry, and algebra I've come up with these formulas, and would just like to see what others come up with before implementing them.
Input: y=axn
90-tan-1(1/naxn-1) for z
10 for y2
root((axn-a(x-.5)n) + .25) for x2
axn+.5(axn-a(x-.5)n) for y1
x - .25 for x1
I'm aiming for an accuracy of 1/2.
12
comments
|
Add Comment
|
L
I derived the (now revised) first formula (for z, rotation) by taking the derivitive of the function f(x), which the user defines, take the function of f(x-.5), and subtract the two. That gives me the rise, and the run would be .5. Using that scheme, you can create a triangle of sort. Using the inverse tangent, you can convert (.5 / f(x) - f(x -.5) to degrees; just tan-1(.5 / f(x) - f(x -.5).
For the height of each brick (y2), I just set it as a preliminary number to satisfy itself; this is just aesthetic, and won't play a major factor. For x2, the length of each brick, I used a whipped up a quick formula for calculating the distance it's origin and the start point of the next brick. First, it calculates it's start point: f(x). Then, we calculate the start of the next point: f(x + .5). Using the Pythagorean theorem, we can determine the length is equal to √(f(x + .5) - f(x))2 + .25.
The coordinates are a bit more deceptive, since it's considered the middle of the brick. For x, the most obvious thing to put would be x. But considering the run is .5, we have to add half of that to x to make it where we want it. For the locational x coordinate, I concluded that it should be x + .25. For y, it is much more complicated. The base would be F(x), but we have to add half the length. We can't use the formula stated above because it's diagonal length; we want purely vertical length. So, we take it before we apply the Pythagorean theorem. Thus concluded; the formula is f(x) + 1/2(f(x + .5) - f(x)).
Currently on the road, I have no way of implementing them yet, so I have no way of testing them besides with pen and paper. Which is why I decided posting them here for some peers to revise might be a "resourceful" thing to do.
![]() |



















Vancouver Mini Maker Faire 2012
Rebuilding NordicTrack ski machine drive rollers
Looking for New Zealand-based Instructables authors for conference on August 27 in Wellington
Call to makers - Brighton Mini Maker Faire
Milk Crates - not as green as you think
TEDxBaghdad - Iraq - violence, dust storms and open sourced manufacturing
UK Mini Maker Faire - The Derby Silk Mill - New Poster to Share!







