I really like letting the students weigh in, and to really debate those choices in the previous paragraph. It works really well in an upper division course when there can be some great debate over what’s interesting. In such a course we spend the day grappling with weird/deep ideas, and we end the class recognizing that we’ve only used broad strokes in class and that the details will come from further resources (the text, my screencasts, etc). The students have taken a bunch of physics courses so they get the subtleties involved in when they should study a derivation vs studying applications.

However, I don’t think this works as well in an intro course. Physics majors are a minority in my general physics 2 course, with the majority being students who really feel like they’re supposed to learn calculations and applications. I don’t actually fully agree with this, but it’s what they think they should do and so that’s what they always vote on at the end of each class period.

What’s even worse, though, is that we’ll spend the day doing the broad strokes and students will vote that the standard should only cover those. I get a lot less of that in the advanced courses, but I found myself quite frustrated with that last year in this intro course.

I don’t think setting up the standards ahead of time is really that bad, even in the advanced courses. I think I’ll do it for intro and play it by ear in the advanced courses as I move forward. One really nice thing about doing it ahead of time is that the day spent in class is very focussed. The students know what they’re going to be assessed on so they can help nominate further resources that they think they’ll need.

Thoughts? Here’s some starters for you:

- I’m going to be in this class and I think this is a cool idea. Here’s why . . .
- I’m going to be in this class and I think this is a dumb idea. Here’s why . . .
- What are some examples of standards that made you frustrated in the past?
- How has this worked in your non-science-major courses?
- If you set all the standards up ahead of time, what happens if you fall behind?
- I think having intro students doing derivations is a waste of time. I hope you don’t ask them to do any for your standards.
- I think having students do derivations is the only important thing. I hope that’s all you ask them to do.
- All students should be in the class because they love physics. If they don’t you should force them out.

]]>

The typical problem to be solved with FEM involves trying to find a function on a 2D surface that obeys a (typically) second order differential equation. A few examples include

- The
~~voltage~~electric potential inside a region where the~~voltage~~potential on the walls is known - The shape of a rubber sheet hung from a frame
- The possible standing waves on a surface
- In quantum mechanics this could be possible eigenfunctions
- In acoustics this represents the possible resonance modes

Normally you divide the surface into lots of triangles and then turn the continuous differential equation into a finite number of linear equations, solving for the value of the unknown function on the nodes. Here’s a great (though long) description of how it works.

For years I’ve been jealous of my friends who are facile with software that can do this sort of computation, because if you try any of those examples above with Mathematica 9 or below it laughs at you and gives up. But now, in Mathematica 10, it’s built into my favorite command for doing differential equations: NDSolve.

The first thing you have to do is define the surface you’re interested in. There are a ton of built in shapes like Disk[] that you can use, but you can also define them using commands like ImplicitRegion and RegionUnion and RegionDifference. You can also make regions out of graphics and a lot of the built-in data in Mathematica like the shape of countries, states, counties, and cities.

Once you have the region specified, you can do a command like this:

`NDSolve[{Laplacian[u[x,y], {x,y}]==0, Boundary conditions ...}, u, {x,y}\Element region]`

where I’ll discuss the boundary conditions below (and “region” has already been defined). The Laplacian command is equivalent to:

Alright, here are some examples:

For this example I set the Lagrangian equal to a nonzero value and set the frame (borders) to be interesting shapes (every frame in the gif is a different solution). You set the border using a Dirichlet boundary condition like this: DirichletCondition[u[x,y]==some cool function, border you’re interested in]. In this example I did a different condition for the inner and outer borders.

Here I solved the following equation on the region in the shape of Minnesota (obtained using DiscretizeGraphics[EntityValue[ctrl-=Minnesota, “Polygon”]])

Another way to do the same thing is to find the resonant modes of Minnesota and combining them to start as a thump:

By playing with Neumann boundary conditions (where you can set the value of the slope at the boundary) I tried to simulate flapping flags:

I didn’t like the edges very much, so I tried again with a square US flag, adjusting the boundary conditions a little more:

Note that you can get the flag image using flag=EntityValue[ctrl=United States, “Flag”] and you can put it on 3D graphics using PlotStyle->Texture[flag].

Finally I’ve played quite a bit with various drum heads and the sounds they’d make. You solve this equation:

But you do it with an awesome brand new command in 10.2: NDEigensystem. It takes just the left hand side of the equation (with an odd negative sign that took me a while to get), along with appropriate boundary conditions. It returns the values of and interpolation functions for the resonant functions. Here’s the 25th resonance of a Texas-shaped drum:

You can use the ‘s to figure out what a drum head will sound like, and you can figure out how much of each resonance you’ll hear based on where you thump the drum by expanding your “thump” function into the resonant functions. I cheat and use a delta function thump so I just need to know the value of the resonant function at the location that I want the thump. By the way, the functions returned by NDEigensystem are orthonormal, which makes my last sentence somewhat more palatable to my mathematician friends.

Here’s a movie I made combining Mathematica’s ability to do all the calculations, image generation, Minnesota data look up, Traveling Salesman solutions, and sound generation with FFMpeg’s ability to combine images and sound into a movie. It shows what it would sound like if you thumped a Minnesota-shaped drum head in the center of all 89 counties in an order determined by the shortest tour through those points.

Fun times, huh? I’ve certainly enjoyed learning a ton about FEM and what you can do with it, and I’ve gotten decently facile with Mathematica’s implementation.

Thoughts? Here are some starters for you:

- Why did you strike out voltage in the early examples?
- You said it was typically second order problems. What about the beam equation, huh? That’s fourth order, can you handle that? I bet you’d have to use something like COMSOL to do that, not wimpy Mathematica (you’re right).
- Hey, I’ve done some of this stuff with Mathematica (x<10), you’re a liar.
- What’s up with the negative sign you have to use in NDEigensystem?
- Your description of a delta function thump has tons of problems, not least of which is that you have to calculate all the resonances, and I have a sneaky suspicion you only do, oh, I don’t know, 20.
- How did you decide to put dampening in the sound? It’s clear you’re not just playing those frequencies combined.
- Why didn’t you do this in python, that seems the obvious choice for anything computer related?
- How could you utilize this when teaching Laplacian solutions in a electricity and magnetism class?
- I tried your flapping flag simulation and I got some negative eigenvalues. What the heck? (Yeah, I get that too when I set the Neumann boundary condition equal to the function itself, which is what I thought a flapping flag would look like. My mathematician friend tells me that then I can’t trust any of this.)
- Why do you only do Minnesota examples? What, you think you’re too good for the rest of the country?

]]>

Back when I graded homework/practice I felt that I was bad at holding the line in my office hours. What I mean is that students seemed to be pretty good at tricking me into doing their homework for them. I was also getting pretty crabby about trying to figure out if the students were doing their own work. So my solution was to have daily 10 minute quizzes. I would assign four problems per class with the promise that in the next class I would roll a 4-sided die to pick one of the four to use as the quiz. This had a lot of benefits/features/odd-side-effects:

- I was perfectly happy to help students in my office hours
- I would “turn the problem inside out” in the quiz by asking for a different unknown, so the students understood that to study they should solve the problem and make sure they understood all the connections among the various variables.
- I would randomly change the numbers involved by asking the class to shout some out. Before letting them take the quiz I would let them discuss whether they expected a weird answer based on the random numbers they’d thrown out. For example, if they said that a capacitor had 100 Farads, they guessed that the rest of the problem would have answers very different than other problems they’d worked.
- Nearly every class day someone would groan after the die was rolled. Sometimes it was me if I felt it had rolled to one of the easy ones. But I liked that it was truly random so they didn’t spend time the night before trying to guess which problem I was going to pick.
- I liked how they had to work on a problem long enough to have the confidence to pull it off in class in 10 minutes. Often their first pass at the problem the night/day before took much longer than that. Combined with point 2 above, this led to some decent problem solving skills

I felt it worked quite well. Plus it dramatically reduced my grading from 4 problems every day from each student to one.

So I was wondering if this would work in my new SBG implementation where I’m trying to hold the line against giving points for homework. I think it might. Here’s what I’m thinking:

- Assign 4 problems per day just as above. Design them to measure students understanding/mastery of recent standards, not necessarily just the one covered on that day.
- Do the 10 minutes on Monday, Wednesday, and Friday even though Friday will still be a review day (there will still only be two standards per week).
- Grade the quiz with standard scores (my 1-4 rubric)
- Continue to allow students to do video reassessments

Content days (Mondays and Wednesdays) would now have 10-15 minutes less per day. I handled that in the past pretty well, but I’ll definitely have to tighten up the activities that we’ll do. I had several sloppy days last year where directions weren’t clear and students spun their wheels quite a bit. I think much better preparation on my part for things like clicker (ok colored cards) questions and white board/group work will pay off huge for this.

Review day will now only have a 10 minute quiz so the rest of the day I can use the awesome nb site from MIT. That’s like google moderator on steroids, as students can ask questions about daily notes and vote each others questions up and down.

I really like point 5 above about students needing to practice enough to get fast at the inside-out problems. That seems to be a good indicator of mastery.

I’m worried that, due to my reassessment policy, students won’t take these quizzes seriously. I’d appreciate any thoughts you might have about that.

Thoughts? Here are some potential comments I’d appreciate:

- I’m going to be in this class and this sounds intriguing. How will ______ work?
- I’m going to be in this class and this sounds terrible. Instead why don’t you . . .
- Why 4? Is it just because you have a 4-sided die?
- Do you like this better than the ticket idea from the last post? What would you miss from that if you didn’t do it?
- Can you give some examples of turning a problem inside out?
- Why do you let them suggest numbers that clearly wouldn’t be physically reasonable?
- Can you say more about how your office hours changed when you switched to this in the past?
- How exactly do you plan to use the nb MIT site?

]]>

**Practice is your ticket**

It’s a Monday, Wednesday, Friday course and I still really like the idea of only 2 standards per week and so therefore a review/assessment day on Fridays. Last year we spent ~30 minutes reviewing material based on their submissions to Google Moderator and then ~30 minutes on a quiz that tended to assess the two new standards of the week (though often hitting earlier standards as well). My thought for this year is that their work on practice problems would drive the discussion/work during the first 30 minutes, but that they could only take the quiz if they submitted some practice work.

Because it’s standards-based grading, missing the quiz isn’t the end of the world. My students are (nearly) always allowed to resubmit video assessments for any active standard. Last year the quiz was always the first assessment on that week’s standards and some students turned in reassessments later. So if they demonstrated that they’ve practiced, they get to take the quiz. If they do well, the only reason they’d ever have to do some reassessment is if I force them to during one of the two oral exams.

I’d actually like to say that submitting evidence of practice is the ticket for even the first 30 minutes (when the review happens) but I feel a little weird about barring students from class.

**What does evidence mean?**

At first I was thinking that students could come with some sheets of paper where they’ve worked on some problems. They’d bring them and turn them in so that they could get the quiz. They’d also use their successes and failures of their practice to focus our conversation during the 30 minute review part. But then I had a different idea:

What if the students did some practice and submitted photographic evidence. This does a number of nice things for me:

- The students tackle the logistical problem of photographing and submitting their work, both of which are necessary (though not sufficient) for figuring out how to do the video reassessments.
- Often students would not do any video assessments because they said they couldn’t figure out all the logistics.

- It gives me an organized way to present students (anonymized) work to the class during the review session.
- I like it being anonymous because we can all just look at work done to find common errors or cool tricks/solutions.

- Let’s me take a look at some of the work prior to the 30 minute review time.

**Other possible options**

I could of course just give points for homework. I tend to not like that option due mostly to cheating but also because homework should be practice, not a demonstration of mastery. I realize, though, that I’m likely being too stubborn about this, so we’ll see.

What do you think? Here are some starters:

- I was in the class last fall and I loved not doing homework. I don’t think it affected my learning at all.
- I was in this class last fall and I wish I had done more homework. Getting points for it would have motivated me.
- Not letting a student take a quiz seems harsh. Why not make it so that if they don’t do homework they tend to fail the quiz?
- Just grade the homework! Yes some might cheat, but it’ll ensure most will get the practice they need. Stop clinging so hard to your misguided principles!
- Why not do what Evan does, having a system of credits that students can earn to have a chance at a reassessment?

]]>

For this first pass, I thought I’d look at a bouncing ellipse (in 2D). I figured it would sometimes bounce low (and spin fast) and sometimes high (and spin slow). I thought I could look to see if it “bounces high” in any particular pattern.

Here’s an animation of what I did:

You can see that the height of the bounce does change. Here’s a plot of the height of the center as a function of time:

There’s definitely some variability, but not as much as you can see in some rugby matches:

Here’s a plot showing several height plots for several different initial orientations

It’s clear that there can be quite a bit of variability of heights. Here’s an animation showing that:

So I don’t think this really shows a “every third bounce” pattern, but I think it’s a good start.

**How I did it**

I tried three different approaches to get these calculations. Only the last one worked, but I learned a lot.

First I thought I’d use the new support in Mathematica for regions. You can define a region (the ellipse) and the region for the ground (half plane) and then look for the intersection to see if they’ve hit each other. Then you can calculate the area of the intersection to use in calculating a potential energy. Good in principle, but super slow and the derivatives needed to do on the potential energy didn’t work. Oh well.

Next I thought I’d try to learn how to use the new mesh/Finite Element procedures. I thought I could find the best triangular mesh for the ellipse and treat all the lines between nodes as springs. Here’s the (very slow!) result:

As you can see, the “ball” gets severely distorted upon the bounce. Also, I think treating all the mesh lines as springs doesn’t correctly represent the stiffness of the internal structure of the ball.

Finally I just decided to say that the ground was a giant one-way spring (it only pushes, it doesn’t pull) and then identify when (and where) the ellipse pokes into the ground. It took me a while to figure out the lowest point of an ellipse, but it was really just differentiating the parametric equation to find a minimum in y. So then I could say that my potential energy is just proportional to y^2 where y is the distance that the lowest point gets below the ground plane. That’s the form of a spring and lets the ground push the ellipse back up. In my experience, this is a useful way to do bounces because it tends to conserve energy and correctly model the time it takes to collide.

What’s cool about doing it using a Lagrange approach (with a potential energy) is that I don’t have to do things like “when it hits, reverse the momentum” and “when it hits, figure out the impulse torque to figure out the change to angular momentum.” Instead I just put the potential energy in as a function of y and theta and the Euler-Lagrange equation takes care of all the rest. Specifically it gets the angular momentum just right without every calculating an impulse torque.

So, the upshot is, I think that high bounces are possible using this mechanism, though a predictable “once every three bounces” doesn’t seem to be happening. This was fun modeling though, and I look forward to adding other approaches based on your comments below (hint hint).

Your thoughts? Here are some starters for you:

- I’m in this class and, wait, never mind, it’s summer
- I think this is cool, but I think you can make it better by . . .
- I think this is dumb, what you forgot about was . . .
- Why don’t you add friction?
- Why don’t you add some x velocity?
- Here’s a better way to deal with that mesh . . .
- Mathematica does Finite Element Analysis now? Cool, can it do . . .
- What is Finite Element analysis?
- Why was finding the bottom of the ellipse so hard? Seems easy to me!
- Please let me know when you redo this in Python, then I’ll read it.

]]>

I came up with three ways (four if you count straight to the center of the earth) and all of them give a different shape for the well:

- Slowly reel out a heavy plumb bob on a line. When you stop reeling, it’ll point out away from the axis of rotation of the earth due to the centrifugal force. As long as you do it slow enough, you can ignore the coriolis force. Have the well shape match the path the plumb bob takes during its (slow) descent.
- Slowly reel out a chain or rope that doesn’t have negligible weight but also doesn’t have a heavy plumb bob at the bottom. Have the well shape match the shape of the rope when you’ve got it as deep as you like it.
- Drop a rock and see which way it goes. Have the shape of the well match the trajectory. This one has the benefit that future rocks won’t hit the side!

So I set about trying to figure out each of those shapes. For those that don’t want the details, here’s a plot showing all three. Well 1 is in blue, well 2 is in red, well 3 is in green.

The easiest one is the green one. I just do a pretty straightforward integration of the equations of motion where:

Where the first term is gravity (note that g changes like a spring as you go deeper), the second is the centrifugal force, and the third is the coriolis force. Once you know the form of the force, doing an NDSolve command in Mathematica is pretty easy.

The other two wells were a little harder to calculate. For well 2 I modeled several (19) masses connected by inextensible strings. I started with them all anchored at the top and hanging straight toward the center of the earth. Then I turn on time with a lot of friction to see where they all settle down to. Here’s an animated gif of that process:

I actually used Lagrange multipliers for all the strings and simply solved for x,y, and z of every particle along with the tension forces necessary to keep their spacing correct.

For well 1 I only used one particle but I changed the constraint to be time dependent. Basically I just had the length between the ball and the anchor grow linearly.

Cool, huh? I wonder which is the better way to do it. What do you think? Here’s some starters for you:

- I’m in this class and I love this. I’ll redo that standard using all of these just so you’ll brag about me.
- I’m in this class and I’m pissed. Why couldn’t you post this a long time ago?
- This is cool. What happens with well 3 if you add air resistance?
- I’m confused. What do you mean when you say “g” changes like a spring as you go deeper?
- This is cool, but I don’t think you did _____ correctly. Here’s a post of mine that does it correctly.
- This is dumb. I build wells for a living and we don’t do this at all. Instead we . . .
- This is cool, but as usual you haven’t bothered to post your code, jerk.
- Having just redone all your work, I’m now convinced that you used a huge omega value (0.5) and a tiny earth (10 m radius) with g=9.8 at the surface, all at 45 degrees N latitude. You could have just put that in your post, you know. Jerk.

]]>

On Fridays we do a review of the two new standards for the week. This time it was about tops/gyroscopes and simple normal mode systems. I set up two problems and two groups to work on them:

- Consider a spinning top balanced perfectly. What happens when a ball hits it from the side?
- Consider two weakly coupled mass/spring systems. Describe how the energy seems to go back and forth between them.

The groups worked hard. Their first assignment, due 5 minutes into the work, was to report any questions they had. Those ranged from “What’s the mass of the top? (whatever you want)” and “Are the two main springs identical? (if you want)” to “Will it tip? (good question)” and “Is this the same math we developed on Wednesday? (What do you think).” They then worked hard trying to figure out what was relevant and what they could do to spice it up (to make it 4-worthy in my system).

But then the inevitable happened. Both groups developed enough that they wanted to see what would happen if we modeled it in Mathematica. Group 1 wanted to see if the top truly would tip at a 90 degree angle to the trajectory of the ball and group 2 wanted to see a Fourier transform of the motion of the masses for various settings of the springs. And both of those sounded like a lot of fun to set up and to play with. However, there wasn’t time left in class for both. How to decide? That’s what I wanted to get down in this post. Not an answer, mind you, but how our discussion went.

At first we tried to figure out which project was harder. The Fourier transform stuff had them a little worried, as we hadn’t done that in this class at all. But figuring out how to the ball impact was difficult too. The problem was, there wasn’t consensus on whether “hard” meant that it should be done in class where they could ask questions, or done in a screencast (by me) outside of class where they could watch it and rewind etc.

One student really liked the latter argument, saying that they were worried that the subtle details would come too fast if I did it in class. I said that maybe I should do the hard one in class to make sure we figured out what was hard for them.

In the end we did what I thought would be the easiest one in class, though it’s finny that even that one proved too difficult to do in class. Here’s the two scasts I made for them after class if you’re interested.

So what do you think. What should be done in class and what should be an out-of-class resource? Here’s some starters for you:

- I’m in this class and I like that you ask us our opinions about this. I like tailoring my learning that way.
- I’m in this class and I hate the way you waste time asking us what we should do. You’re the expert, so teach!
- This is cool. Do they change what types of things they ask for as the class goes on?
- This is dumb. You shouldn’t put them in two groups if both of the problems are things they should learn.
- This is cool. What happens when you do what they ask for but you don’t quite finish?
- This is dumb. You should promise to do both as scasts and then just spend class time having them predict what’ll happen. That way they’re motivated to watch the vids.
- This is cool. Do you just have the vote be democratic or do you always wait for consensus?
- This is dumb. The whole class should work this way, not just the end.
- This is cool. I’m really surprised at how the top moves. Maybe doing the impact as a temporary gravity adjustment is wrong.
- This is dumb. Doing everything in Mathematica is stunting their growth, stop it.

]]>

However, at the end of class, the students made it clear that they didn’t want me to finish any of them. They each had a different example they had in mind that they were intrigued by and they wanted to see if they could finish it to submit as an assessment of the day’s standard (“I can do an interesting problem involving noninertial forces on the earth”). So instead we all decided that I should do a totally different example and leave all the rest unfinished.

I really like how they’re taking ownership of the material, and how they’re being honest with me and with each other about what they understand and what they’re willing to work at to see where it goes. I say each other because they sometimes argue about whether it would be worth it for me to fill in the blanks. Usually the people asking for me to do it are saying something like “… but I’m confused about where that comes from …” or “… I don’t even know what the first step should be …” or similar sentiments. So I like how it makes the videos I do meaningful to the students. I’m no longer guessing what they’ll struggle with and providing vids ahead of time. Now I wait to see what they struggle with in class (when they first are hearing about the concepts) and we work together to make the (now pretty short) list of screencasts that I should go make.

So, to be clear, I’m pretty happy with all of that. However, it hit me the other day that students who miss class are missing out on more than they used to when I did a regular flipped format. In the old days, I could say “don’t worry, just watch the vids and work some practice problems” because my scasts usually covered what I thought were the missing or mysterious steps from the book. But now the vids are very personal to the students who were in class that day. I personalize them by saying things like “as xxxxx said in class, this is where it gets weird” or “remember, what yyyyy suggested is another way to do it, but it takes longer.” What do the students get out of that if they’re not there in the first place?

I thought of all this as I got an email from a student apologizing for missing class. I don’t feel like suggesting that he watch the vids is going to be overly useful, but they and the book are all there are. Of course he can come to my office to get caught up, but that’s still a far cry from the inquiry atmosphere that I’m trying to build in class.

Anyways, I just wanted to put this out there to see what you guys think. Here’s some starters for you:

- I’m in this class and I hate it when I miss class for just this reason. I like that class is super useful.
- I’m in this class and I hate it when I miss class for just this reason. Could you please just do a normal flipped class?
- Why do you sometimes write vids, sometimes scasts, and sometimes videos?
- If you personalize the vids, does that mean that you do a whole new set of scasts every time you teach the course? (yes)
- Of course you must have an arbitrary attendance policy to give the students all kinds of extra credit for showing up, right?
- For me, if the students miss class, I figure it’s their own fault and I lie about what went on. You should do that too.
- For me, if the students miss class, I take it as a personal failure and I vow to entertain them better so they’ll show up more. You should do that too.
- If you taught at 8 o’clock you’d have all kinds of problems with this. (Actually I teach at 8 all the time and I rarely have any skips)

]]>

- No student should do the same standard twice
- On any given day, there should be a minimum of repeat standards
- No two students should have the same set of standards (even in a different order)

At first I thought I could just randomize the student names and then count out the standards in order. It takes care of the first two bullet points, but it turns out that the third one kept happening. So, on to using a genetic algorithm to do this.

Here’s what I did:

- Put together a population of possibilities
- each one of these randomly assigns three standards to each student
- Note that the three bullet points above are not at all considered (in fact, usually all three are violated with each of these random starters)

- rank each candidate according to the three bullet points above
- For example, if a student has a repeat, that’s a penalty. If they have all the same standard all three times, that’s a double penalty

- Using a weighted selection scheme, choose a parent and then mutate it to make a new candidate for the next generation
- The weights are the penalties (lower are selected more often, though)
- A mutation consists of randomly changing one or more of the student/standard assignments
- The mutation rate goes down throughout the run (this I borrowed from Simulated Annealing)

- Repeat 2-4 until you have a solution you like

After about 100 iterations it settles into something that meets all the requirements.

The flexibility I was mentioning above comes in when I realize that I want to make some other subtle changes. I realized that I want to add these conditions:

- Minimize the number of standards that students repeat throughout the semester (we have 9 oral exams all together)
- Maximize the spread of the standards for each student
- I simply do Max(list) – Min(list) to get that
- In an earlier “solution” I noticed that one student was assigned numbers 1, 2, and 3 and I didn’t want them to spend the week working on just one section of our material

Instituting those changes was simple, just change the cost function to include them and then re-run the simulation.

At the end of the day it all works quite well. I get a distribution of the standards into my students hands (so they can prepare over spring break) and I know that all my bullet points are met.

So what do you think? Here are some Rhett-Allain(TM) starters for you:

- I’m in this class and I’m really glad you’ve worked this out. I was super nervous that a fellow student might have the same standards as me and this fixes that.
- I’m in this class and I’d much rather just pick my own standards, focussing on the ones I’ve done poorly on.
- Why do you put “solution” in quotes?
- How much do you pay Rhett when you use these starters?
- Why do you have the mutation rate change? Why not have it evolve?
- If you change the weights of each category, do you get drastically different results? (yes, though not if I let it run a really long time)
- Can you post the code you use for this?
- I’ve got a similar problem, how would you code it?
- Wait, this is the Friday before your break? Why are you posting to your blog? Get a life!

]]>

- B-: 1000 (4)
- B+: 1001 (5)
- A-: 1000 (8)
- A+: 1010 (10)

If you consider the four coils to be the cardinal directions, I put north on B-, south on B+, east on A-, and west on A+. To get half steps:

- NE: 1100 (12)
- SE: 1101 (13)
- SW: 1111 (15)
- NW: 1110 (14)

So to do the standard 8 steps when doing half steps, the decimal order is

4, 12, 8, 13, 5, 15, 10, 14

Here’s some quick code for turning decimals into firing the correct pins:

void fixbool(int n) {

digitalWrite(3, HIGH && (n & B1000));

digitalWrite(11, HIGH && (n & B100));

digitalWrite(12, HIGH && (n & B10));

digitalWrite(13, HIGH && (n & B1));

}

]]>