Who I am, syllabus, calendar, website, etc Teams, and recurring meeting bug 3D Structures: Three dimensions, usually called x, y, and z In computer games, made of triangles 9 coordinates per triangle triangles are always flat In movies, they're in quads So I hear Blender can turn quads into triangles Blender: Blender can be used to edit these interactively Can also execute Python scripts It's gone through a few UI revisions I don't use it enough to know where things are in each version We'll be scripting it anyway Besides the location, you might want some extra information: Color Texture Coordinates Normally an alternative to color Texture often isn't 3D, more like a sticker It *could* be 3D and interact with lighting Normal Vector For lighting usually Fractals: CS101 example This is one means of generating 3D models Landscape algorithms, trees, etc Show something with my old binary tree Python: Most of you probably already used it Very easy language to learn Quick language to program in Runs really slow Great for programs that won't run very often Also excellent for scripting It won't slow down a web spider Example time: Let's start with the box and sphere example How about a staircase with a sphere at the top? Objects with objects in them Python doesn't have namespaces like C++ bpy = "blender python" ops = operators Not operations? https://docs.blender.org/api/current/bpy.ops.html object = object operators select_all = select all objects Blender scripts change the program state Think about it like operating a program rather than using a library Note: Default paramters in Python Demo of this primitive_cube_add: Lots of default arguments we'll leave alone We do need to set the location Then we need a reference to the current object Luckily, we just added it! scale is a tuple, not a function What good is it? Let's see if we can import it into a game engine This week's assignment: Get Blender running somewhere (or decide to work in the lab) and make a script that generates a piano keyboard