Monthly Archives: November 2016

Rules for Engagement on Twitter

Hi.

Today I blocked several people for the first time ever on Twitter. These are people I have known for a long period of time and one of whom I have met in person and know to not be a sociopath. Here is why.

I have Post Traumatic Stress Disorder. When I was in college a stranger held me hostage in my dorm room and raped and tortured me for two and a half hours. For those of you fortunate enough to not have PTSD, one of the delightful aspects of having it is dealing with flashbacks. Flashbacks happen when you are in a situation that is reminiscent in some way of the circumstances that caused your trauma. It’s your brain’s way of protecting you. It senses that you are in a similar situation to one where bad things happened to you, so it tries to force you to flee from that situation to protect yourself.

I recently certified Delia as an Emotional Support Animal because one thing that triggers flashbacks is being trapped in an enclosed metal tube with a bunch of men I don’t know. I can fly without her, but the efforts it takes for me to calm myself down for several hours drains every ounce of energy I have. I get to my destination exhausted and it can take me up to a month to recover.

Another thing that triggers flashbacks is dealing with aggressive males who do not listen to me and continue to engage me when I want to be left alone.

There have been multiple times this year on Twitter where I have made a comment or asked a question and have been bombarded with well meaning but obnoxious advice from men. It ranges from speaking to me like I am a toddler and couldn’t possibly have considered the most obvious solution that they are giving me or trying to force me to use their preferred mode of whatever in spite of my pleas saying that I already considered it and it won’t work for reasons I don’t want to articulate in 20 tweets.

When this happens, I start to feel overwhelmed. I feel personally attacked and unsafe. It causes me tremendous amounts of emotional distress. I start to have flashbacks and experience all the emotions I experienced when I was being raped. I have had at least a half dozen times this past year where I have gotten so distressed from these interactions that I have had to make emergency appointments with my therapist and spend money I don’t have trying to recover to the point that I am able to work. I have been in constant fear of not being able to work and earn money and destroying my career this year because these well meaning but clueless men have insisted upon trying to be “helpful.”

I have tried multiple times over the last year to explain to people that what they are doing is causing me real harm and damage. Every time I have attempted to engage in a dialog in explaining where I am coming from, I get a bunch of defensiveness and people telling me that they’re engineers. They want to solve the problem. They’re not intending to cause me psychological damage and therefore I don’t have the right to be upset by their behavior.

I don’t give a shit what you intend. It’s the result of your actions that matters.

If you are driving around and you get distracted by your phone and run someone over who is paralyzed for life, it doesn’t matter that you didn’t intend to run them over. They’re still damaged. You don’t get to hide behind your intensions when what you are doing is causing me actual harm.

I am tired of being responsible for having to do the emotional legwork that men are unwilling to do. I have told them many times how to avoid causing me harm and I am being told it’s my problem and they won’t change because their desire to avoid hearing that they’re doing something harmful is greater than my need to be able to earn a living.

I don’t want to be a massive bitch and make people feel like they can’t talk to me without getting bitched out, so I am establishing my rules so that I can protect myself psychologically while still being able to engage with people on Twitter:

First Strike: I Ask You to Back Off

I understand that on Twitter things can escalate very quickly and tempers can flare. At this point something will have happened and I will start to feel overwhelmed but I can still avoid a total shutdown, but only if you stop engaging with me.

I will tell you that I am feeling overwhelmed and ask you to back off.

At this point, if you back off, we’re good. You can feel good about being an engineer and know that you have made a situation better. If you still want to make this point to me later, please wait a day. Ask me for my email and send me an email or give me a chance to engage in a better forum of communication.

Second Strike: I Send You a Link to this Blog Post

It’s possible you’re reading this because I sent you a link to this blog post. I am trying to explain to you why I can’t continue to engage with you. I am not trying to blame you or tell you that you’re an asshole. I am assuming that you mean well and I am trying to find some way to let you know that was you are doing is causing me harm with the hope that you will respect my need to be left alone. Again, if you read this post and you back off and leave me alone, no harm, no foul.

Third Strike: I Will Block You

If you have gotten to this point and you are still continuing to engage with me, then I will block you. I am doing this out of emotional self defense. You have shown that you are not willing to respect my need to feel safe. You are leaving me no other option than to block you to protect myself.

If you’re someone that I know personally and have invested in a relationship with, I will try to remember to unblock you later. I will emphatically ask you to please stop doing things that cause me psychological trauma.

I do not want to block people, but I also do not want to spend a hundred dollars seeing a therapist to be able to keep working. My need to be able to work supersedes your desire to feel helpful. If you want to be helpful, please back off if I tell you that you are forcing me to shut down. If you respect that, we’re cool.

Thank you.

Special Announcement: The Metal Programming Guide

Hello all. For the last few weeks I have been hinting that I have a new project that I had not yet announced yet. I wanted to make this announcement at MacTech, which I did yesterday, so I am now publicly announcing this.

I am working on a new book: The Metal Programming Guide. If you are familiar with the OpenGL series of books like the OpenGL Red Book and the OpenGL Blue Book, this is going to be The Red Book for Metal. The publisher for this project will be Pearson/Addison Wesley, so this is not a self-publishing effort on my part. I will have technical editors and people breathing down my neck if I miss deadlines!

Back in 2014, when Metal was announced, it excited me tremendously. I did a series of conference talks on it throughout that year, but a little thing called Swift kind of got in the way of my learning path for Metal.

This year has been something of a disaster for me on a personal level and I didn’t get to accomplish what I had hoped to this year. Being given an opportunity to finally get to master Metal and write a book about it has given me hope for the future. I have always felt like Metal was something I was meant to do, but I wasn’t really ready to tackle it until now.

Right now I am trying to balance doing some short term contract work with attempting to work on the book. I hope to not run out of money before I finish the book, but I also want to avoid doing full time work that would prevent me from making progress on the book. We are very early in the process right now, but I am giving it everything I have to try and get this done in a reasonable amount of time.

I am hoping to be able to make weekly posts on here and my podcast about various aspects of Metal programming that I am not able to include in the book due to lack of time/space/things being out of scope.

Even though I have been a co-author on a number of programming books already, it has always been my dream to do an immersive book on a topic such as Metal. I am excited to learn this amazing framework and share that knowledge with everyone else.

I’m announcing it here on this blog because I have absolute confidence that this project will be successful. I’ve been waiting to do this for a long time. I do not plan to drop the ball on this. Bring it on!

The Cost of Complacency

This is another cross post from my podcast Janie Rants. I will record this script later today and post it to that site as well.

Yesterday I, along with half of our nation, watched in growing horror as we saw the election results come in. Last year we laughed at the Republicans as they saw their establishment candidates knocked out one by one by an orange con man. We shook our heads in disbelief that any woman would vote for a man who was on tape talking about grabbing women by the pussy. He went on rants at 3:00 in the morning calling an ex-beauty queen a pig and an eating machine. Surely no one would trust this man with codes that could start a nuclear war?

I want to rewind everyone back a few weeks to October 27, 2016.

This feels like a lifetime ago, but this was when Apple announced their update to the new Retina MacBook Pro.

People like me have been waiting anxiously for an update to this line of computers. I have wanted to buy a new laptop for a while but I wanted to really max out the processor and the ram.

What did we get?

We got the same RAM. Close to the same processor. And a touch bar. Oh, and all of our ports are now gone and we have to spend an extra hundred bucks or two to buy all the dongles we need to plug our new iPhone 7s into our laptops.

A lot of people were really angry about this. Most people dismissed them because every time Apple announces something, everyone is angry. Everyone is angry that their pet thing didn’t get featured with an upgrade.

Most people who complained about the new Macbook Pro were chastised by the community. We’re told that Apple has a reason for doing what they’re doing and a lot of us didn’t like certain changes made to iOS but that after we got used to them we realized they had a purpose and Apple knew what it was doing, so we should have faith that there is a reason behind all of this too. Even if there isn’t a reason behind everything, what are you going to do about it? Apple is still the best choice even if it’s not as much better as it used to be.

I feel like those people who are telling us to stop complaining are like the establishment politicians from both the Republican and Democratic parties.

People in the Apple community are upset. We remember ten years ago when we saw all these amazing innovations coming from Apple. I recently received a vintage blueberry iBook from someone to decorate my living room. When I saw the computer for the first time, I laughed out loud with delight. The design of the computer was like nothing I have seen in such a long time. It was different and unique. It made me smile.

Nothing Apple has produced over the last five years has made me smile.

I got an aluminum Mac Book in 2004 that was nice. It looked modern. It was well built. It had a neat track pad. It was light enough that I could carry it places. It felt like a modern machine.

When I look at every computer that has come out since that one, they’re all variations on the same tune. Same with the iPhone.

Every year the devices get thinner and more fragile. There are more bugs in the tools and the frameworks. There is less time to create innovative applications because by the time you learn the new ropes, the system changes. The changes people actually want to see never get done. But there is an assumption that people will just keep buying Apple products because we’re locked into an ecosystem and we’re obligated to do so.

I feel like this is similar to the attitude we saw from the Democratic party in regards to Hillary Clinton.

I want to say I like Hillary Clinton. I think she would have been a solid president and I am incredibly sad that she lost. I think that thirty years of gas lighting and fake scandals and constant investigations turning up nothing have tarnish her reputation and it saddens me that an orange troll can be on tape talking about grabby women by the pussy and be taken more seriously than a religious woman who has dedicated her life to public service.

That being said, this election was about change. The election in 2008 was about change too. The Great Recession hit and destroyed our economy. The Democrats rode to the White House on the shoulders of Barack Obama, the great hope of our generation. He promised to close Guantanamo Bay and to stop sending our soldiers to die in the Middle East. He promised to clean up the corruption that resulted in the Great Recession.

He didn’t do any of these things.

He passed the Affordable Care Act, which is a landmark piece of legislation. One of the only reasons I can be an independent consultant is because of the Affordable Care Act.

But no one went to jail over the corruption that caused the Great Recession. Gitmo is still up and running.

We can rightfully make the argument that Obama was hamstrung by Congress for the last six years, but the biggest reason that we wound up with the Tea Party just two years after Obama’s historic election is because people felt betrayed that he didn’t do what they thought he would do. He didn’t clean up corruption. He didn’t throw the bankers in jail. He created a giveaway to the insurance industry to allow them to have a blank check for health care. We rejected Hillary in 2008 because Obama promised us hope and change and we got more of the same.

The health insurance marketplace opened on November 1st. My health insurance went up nearly a hundred dollars a month. I saw classmates who work on family farms show that the cost of insuring their wife and child in the most bare bones package available was a thousand dollars a month with a twelve thousand dollar deductible. That’s completely bogus.

Obama continued to get advice from the same corporate people that crashed the economy in the first place. He didn’t enact the bold action people elected him for because he trusted the advice he got from the people with the same college education and background that he had. I used to think Hillary would have been different, but now I am not so sure.

There is an economics experiment called the Ultimatum Game. In this game, there are two players. One player is given ten dollars and is told that they can split it any way they want to, but the other player can either approve it or deny it. If the player approves, the money is split accordingly and each player takes their money and leaves. If the player denies it, then no one gets anything.

A common way most people split the money is to take nine dollars and offer one to the other player. If you think about this rationally, the second player should approve of this deal because it gives them a dollar they would not otherwise have. But we’re people and we don’t think rationally. We don’t think it’s fair for the first player to get nine dollars when we only get one just because they got to choose the split. They have more to lose than we do if we reject the offer and we feel better about denying the other person their nine dollars than we do about losing our one dollar.

For the last several decades the American political system has been an ultimatum game. The establishment politicians have used social issues like abortion and civil rights to try and bludgeon us into agreeing to their deal. We’re supposed to vote for Hillary to avoid a future dictated by people like Paul Ryan wanting to enact his Ayn Randian vision of America where he will destroy our safety nets and let everyone die in a state of unmitigated poverty.

People who are shocked by this are not familiar with the ultimatum game. They thought everyone would nicely go along with the status quo because the status quo is better for them than the probable hell the next four years are going to be. But they’re going to be a lot worse for us than they are for them. It’s going to be worst of all for our Muslim brothers and sisters out there.

I consistently see people earning ten dollars an hour fighting against a fifteen dollar an hour minimum wage because they don’t think people working at McDonalds deserve fifteen dollars an hour when they’re only earning ten. They don’t care that they would increase their own wage by fifty percent by supporting a fifteen dollar and hour minimum wage, they just want to make sure that no one underneath them manages to get ahead of them. They want everyone to be brought down rather than being brought up.

A lot of anger and ill will right now at the Democratic party is reminiscent of a lot of the arguments I have been making about the tech industry. The party wanted Hillary because Hillary was a good culture fit. She would support their interests. They all met at the Christmas party and sent their kids to the same schools. They wanted someone they were comfortable and familiar with.

And that is exactly what everyone is angry about.

They don’t want to take their dollar while the banks get nine. They don’t like being told that they should be happy with their dollar because if Donald Trump is president then they won’t get any dollars.

Right now in the tech industry we have a massive glut of wealth that is going to a small group of people who are all in their early twenties who all went to Stanford or MIT who are all pitching the exact same shitty product that already exists in ten different forms somewhere else. Nothing innovative is happening because it’s a giant echo chamber where the same people are starting companies doing the same things and selling them off to the same other larger companies. No new ideas or people or perspectives can get in because they’re uncomfortable and we’re on the verge of a collapse because of it.

You can’t keep producing the same product over and over again that people aren’t interested in buying. You can skate by for some period of time on that apathy, but eventually a disruptive force will come and shake things up.

IBM didn’t take the PC market seriously. They didn’t think a small company like Apple could completely change the way we live our lives. Now Apple is falling into the same complacency trap that sucked up IBM and Xerox. They think everyone is locked into their ecosystem and that no one wants to buy Android phones because they’re inferior, so they aren’t listening to what we’re saying we actually want because they think we have no choice but to accept what they’re producing.

Let’s imagine that another company creates a fantastic competitor to the iPhone. It could be Google. It could be some upstart we’ve never heard of. Their products are innovative and exciting. You’re not trapped in a proprietary ecosystem where you must own an underpowered Mac to write applications for this new device. You can buy cheaper and better devices that are genuinely exciting and not just more of the same.

Or pretend that there is a customer rebellion and everyone refuses to buy iPhones. Some change is made and the customer base leaves out of spite.

It might not happen tomorrow, but it will happen. People don’t like being backed into a corner and told they have no choice. It happened to other companies and it is happening to Apple. Apple can listen to the rumblings of discontent coming from its user base and make a decision to embrace the things that made it great, but I don’t think they will. It’s easier to be complacent and keep doing the things your comfortable with that have always worked before, especially when you’re surrounded by people who all think the same way you do.

One of Steve Jobs’s favorite songs was “The Times, They Are A’Changing“ by Bob Dylan. I suggest that in the wake of this election we all take a deep look at our society and we stop blaming people who have been telling us for decades that they’re angry but were ignored because we assumed they would all just go away and die. The signs were there, but we didn’t want to see them. We didn’t want to fix things that were broken because they worked good enough, and now we’re facing a reckoning.

Come gather ’round people
Wherever you roam
And admit that the waters
Around you have grown
And accept it that soon
You’ll be drenched to the bone.
If your time to you
Is worth savin’
Then you better start swimmin’
Or you’ll sink like a stone
For the times they are a-changin’.

Primitive Drawing and Assembly in Metal

One of the main reasons I got interested in iOS was because I wanted to learn graphics and audio programming.

I got really interested in OpenGL, but after a year of trying to learn it I wasn’t making any progress.

Anyone who has tried to learn OpenGL have gone through the same frustrating experience I have. You find a tutorial on Ray Wenderlich and you write a bunch of code and at the end you have a spinning multicolored cube. That’s really cool!!

But then you realize that you have absolutely no idea how to do anything else.

For a really long time, I thought that I had to enter all of my vertices by hand because every tutorial I saw had you write your vertices by hand. My brain was scrambled by the idea of trying to create a large, complex 3D model by hand coding the vertices. It’s hard enough coding things with auto complete, what if you miss a value?! Do you have to keep building it and keeping track of the vertices and try to figure out which one needs to be moved when there are a thousand of them?!

Eventually I was told that you import a pattern file into your application, but until the release of Model/IO in iOS 9, you had to write your own parser from scratch to import a file from Blender or Maya.

So I faced an incredible amount of frustration trying to figure out how you get vertices into an application and how they work together to create something. I kept being told that those projects of the spinning cube introduce you to all the things you need to know in order to make OpenGL work, but it was something that was not intuitive.

I am seeing people go through similar frustration while trying to learn Metal. I am hoping to do a series of blog posts over the next few months about aspects of Metal and 3D graphics programming that I don’t feel I have seen explained very well in other places. This stuff is complicated and difficult to explain, so no judgement on anyone who produces technical materials on Metal or OpenGL.

Star Project

I decided to do a project that was slightly more complicated than a triangle or a cube but not as complicated as a 3D pug model. I want to figure out how to explain this stuff in a way that the reader can extrapolate and scale the complexity while still understanding how the fundamental concepts work.

I decided to try and draw a two-dimensional star. It’s slightly more complicated than a triangle but it’s still simple enough for a person to sit down and conceptualize.

Yes, I screwed up the vertex labels at the bottom.

Yes, I screwed up the vertex labels at the bottom.

I really hoped that I could find a simple CAD program to generate a pattern file for my 2D star, but after multiple frustrating conversations with various people, I decided to bite the bullet and just plot out the vertices by hand.

The Metal rendering space is slightly different than what one expects coming from something like Core Graphics. I am used to the idea that the phone has a normalized coordinate space where the height is one unit and the width is one unit.

Metal still utilizes a normalize coordinate space, but it’s two units high and two units wide, so the center of the screen is coordinate (0,0,0). So the upper left corner of the screen is at coordinate (-1, 1, 0). The lower right corner is (1, -1, 0). It’s not complicated to understand, but it’s slightly counterintuitive for someone coming from the idea that everything is a value between 0 and 1.

I created my coordinate space using graph paper. I made each square on the paper worth 0.2 units and made the space ten squares by ten squares.

I understand that because the phone screen is not perfectly square that the star is not going to look like this when it’s finally rendered. One of the things I want to do later is figure out how to constrain the drawing area to be square so that the star renders properly, but that’s a task for a later time.

Writing out vertices by hand like a savage.

Writing out vertices by hand like a savage.

In Metal and OpenGL, shapes are composed of triangles. All the big scary 3D models that make up a Pixar movie are composed of meshes of triangles. Everything can be broken down into triangles.

So let’s think about a star. It’s obvious that the points are composed of triangles, but what about the middle? The middle is a pentagon. This pentagon can be composed of five triangles by drawing out from the center to each of the vertices between the points.

So if you think about how to describe the star to the renderer, you are going to describe ten triangles using eleven vertices. There are five vertices at the points, the five between the points, and finally one in the middle.

Metal Primitives

When you package and pass your vertices to the vertex buffer, you need to describe to the vertex buffer what type of shape it’s drawing. I know I just went off on how everything can be broken down into triangles, but there are a few flavors of shapes you can draw with Metal.

Metal has a enum of Metal Primitive Types. There are five different primitives available to you:

  • Point: Rasterizes a point at each vertex. You have to define a point size in the vertex shader.
  • Line: Rasterizes a line between a pair of vertices. These lines are separate and not connected If there are an odd number, then the last vertex is ignored
  • Line Strip: Rasterizes a line between a bunch of adjacent vertices, resulting in a connected line.
  • Triangle: For every separate set of three vertices, rasterize a triangle. If the number of vertices is not a multiple of three, either one or two vertices is ignored.
  • Triangle Strip: For every three adjacent vertices, rasterize a triangle.

So the easiest way to think about how to describe the star to the vertex shader is to hand enter ten sets of three vertices that describe a triangle.

let vertexData:[Float] =
    [
        // Internal Triangles
        0.0, 0.0, 0.0, 1.0,
        -0.2, 0.2, 0.0, 1.0,
        0.2, 0.2, 0.0, 1.0,
        
        0.0, 0.0, 0.0, 1.0,
        0.2, 0.2, 0.0, 1.0,
        0.3, 0.0, 0.0, 1.0,
        
        0.0, 0.0, 0.0, 1.0,
        0.3, 0.0, 0.0, 1.0,
        0.0, -0.2, 0.0, 1.0,
        
        0.0, 0.0, 0.0, 1.0,
        0.0, -0.2, 0.0, 1.0,
        -0.3, 0.0, 0.0, 1.0,
        
        0.0, 0.0, 0.0, 1.0,
        -0.3, 0.0, 0.0, 1.0,
        -0.2, 0.2, 0.0, 1.0,
        
        // External Triangles
        0.0, 0.6, 0.0, 1.0,
        -0.2, 0.2, 0.0, 1.0,
        0.2, 0.2, 0.0, 1.0,
        
        0.6, 0.2, 0.0, 1.0,
        0.2, 0.2, 0.0, 1.0,
        0.3, 0.0, 0.0, 1.0,
        
        0.6, -0.4, 0.0, 1.0,
        0.0, -0.2, 0.0, 1.0,
        0.3, 0.0, 0.0, 1.0,
        
        -0.6, -0.4, 0.0, 1.0,
        0.0, -0.2, 0.0, 1.0,
        -0.3, 0.0, 0.0, 1.0,
        
        -0.6, 0.2, 0.0, 1.0,
        -0.2, 0.2, 0.0, 1.0,
        -0.3, 0.0, 0.0, 1.0
]

I want my star to be kind of flashy. I would like to set a pseudo-radial gradient on the star where the tips are red, but the middle is white. So I need to set up another array of floats describing the color data as it correlates to the positional data.

let vertexColorData:[Float] =
    [
        // Internal Triangles
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        
        // External Triangles
        1.0, 0.0, 0.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        
        1.0, 0.0, 0.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        
        1.0, 0.0, 0.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        
        1.0, 0.0, 0.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        
        1.0, 0.0, 0.0, 1.0,
        1.0, 1.0, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0
]

Over in the view controller, you need to create a buffer to hold the position data and one for the color data for your vertices:

var vertexBuffer: MTLBuffer! = nil
var vertexColorBuffer: MTLBuffer! = nil

Now you need to connect those buffers to the arrays of vertex data. The buffers don’t know how much data they need to store, so you have to calculate how large these vertex arrays are so the buffers know how much space they need to allocate for the vertex data.

let dataSize = vertexData.count * MemoryLayout.size
vertexBuffer = device.makeBuffer(bytes: vertexData, length: dataSize, options: [])
vertexBuffer.label = "vertices"

vertexColorBuffer = device.makeBuffer(bytes: vertexColorData, length: dataSize, options: [])
vertexColorBuffer.label = "colors"

img_5660Since the vertex position and color arrays are the same size, you can reuse the data size variable for both buffers.

At the end of the process, this data is scheduled by the render encoder to be sent to the vertex shader and be processed by the GPU.

renderEncoder.setVertexBuffer(vertexBuffer, offset: 0, at: 0)
renderEncoder.setVertexBuffer(vertexColorBuffer, offset:0 , at: 1)
renderEncoder.drawPrimitives(type: .triangle,
                                   vertexStart: 0,
                                   vertexCount: vertexData.count)

Build and run the app on a phone and you get a nice star! Huzzah!

Wrap Up

I created a GitHub repo for this project here. Honestly, most of this project was basically me just using what comes in the template but changing the vertex data.

Looking this over, it seems kind of inefficient. The middle set of triangles feel like they could be a triangle strip. I would like to add a nice outline to the star to make it look nice and neat. I also would like the star to not be morphed by the screen.

I am planning to update this project periodically to make it more efficient and customizable.

At the very least, I hope this adds some understanding to how Metal breaks down larger shapes into triangles and how it’s able to go through and build the shapes back up again.