Page 7-6: Exercise: Quadcopter / Multi-Rotor

# Page 7-6: Exercise: Quadcopter / Multi-Rotor

You have made a Quadcopter in 2D on a previous assignment. We'll do the same thing again, with a few twists.

Summary: In quadcopter.html and quadcopter.js turn the flying donut into a quadcopter (with spinning rotors)

First, since this is 3D, we won't just see the vehicle from above, so you have a little more freedom in what you make. It needs to have multiple (spinning) propellers, but it could be a traditional helicopter (with a vertical rotor in the tail) or even a multi-engined propeller airplane.

Second, in addition to the aircraft, you need to have a "radar dish" on the ground that always points towards the aircraft. This object should stay in the same place on the ground, but rotate so that it is always pointing towards the aircraft (tracking it). As the aircraft moves, the radar rotates. It doesn't have to be a radar dish (you can be creative), but it does have to have an obvious "top" that always points towards the aircraft.

The goal of the assignment is to have you make a hierarchical object (aircraft with propellers) that flies around in 3D, and be able to point one object at the other. Other bells and whistles are nice (and can earn bonus points).

Some requirements:

1. The aircraft can be simple in shape, but it must have an obvious front that faces forward when flying.
2. The propellers can be simple (a thin box can work), but they must have an obvious center that they spin around, and they must spin as the aircraft flies.
3. Your scene must have a ground plane.
4. Your scene must have at least one aircraft that flies in a circle. You can have the other aircraft fly in more complicated ways (see bonus points).
5. You should have at least two aircraft flying. Both with spinning propellers.
6. For each aircraft there should be an object on the ground that tracks it. These can be radar dishes, but they can have a different shape as well. Whatever they are, it should be obvious which direction they are pointing and that they "track" the aircraft (they continually point towards it as the aircraft flies around).

Note: it will be better to have one aircraft, with a functional radar dish, than two aircraft and no radar dish. Of course, it's best to have two of each. Once you make one, it shouldn't be too hard to add another.

The basic framework provides some lighting, a simple ground plane, and OrbitCamera controls. You are welcome to improve the lighting, and make the ground more interesting.

You may load geometry from a file (using, for example THREE's OBJLoader). However, if you do this, you must describe in your readme file where the OBJ files come from. If you do not create the file yourself, be sure to give proper attribution, and confirm that it comes from a source that allows you to use it (i.e., it has a Creative Commons license). Don't forget to add any geometry files to the repository (we have made this mistake on a previous workbook!). Please do not give big files, or things that use features we haven't discussed in class yet (like Textures). You may only add object files (e.g., .obj).

If you're curious how to make a radar dish, you can use the example on the TREEE.js LatheGeometry page. Or you can make it some other way. A Cone would work at a minimum. It is more important that the object has the right behavior (it clearly points toward an aircraft).

You should complete this assignment in the file quadcopter.js (which is loaded by quadcopter.html). We've given you some code to start - a basic ground plane, a camera, some lights, even a simple animation loop. We've put the OrbitControls for the camera into the scene. You don't have to use what we've put there (you can take out things if you want to put in better stuff - especially for the ground and lighting). However, please include OrbitControls in your result.

This part of the assignment does not use the framework code. Please build everything using THREE.js "from scratch" (or from the starter code). In other parts of this workbook, we'll introduce you to some framework code that should help in making bigger projects.

We will reward exceptional projects with bonus points. Some things you can do:

1. Have interesting aircraft, potentially with multiple types of aircraft. This means more than just finding a shape and loading it from a file (although, loading geometry is allowed).
2. Have the aircraft have interesting behaviors. One has to fly in a circle. Others can fly in more complex patterns. For example, have a quadcopter that takes off, picks a random place to fly to, turns to face that direction, flies in that direction and lands when it gets to its destination. You could give it a spotlight that shines at its destination so we know where its going.

If you do something you feel is worthy of bonus points, be sure to describe it. Sometimes interesting behaviors aren't obvious at a glance.

After this exercise, move on to the next page to learn about the framework code we'll use for the next exercises (and future workbooks).