December 31, 2017

Books I read in 2017

0 comments
Each year I write a list of books I read during the year. This is the 2017 list:
  1. The art of game design. A book about how to design games.
  2. Masters of Doom: How Two Guys Created an Empire and Transformed Pop Culture. Is a biography on John Carmack and John Romero, who created the popular games Wolfenstein 3D, Doom, and Quake.
  3. The Unthinkable: Who Survives When Disaster Strikes - and Why. The book will tell you what's happening with your body when a disaster is happening to you. Examples of disasters in the book includes 9/11 (both what was going on in the heads of the people in the buildings and in the airplanes), Hurricane Katrina, the 2004 Tsunami, a restaurant on fire, the 2007 Virginia Tech shootings, and crowd crushes during the pilgrimage to Islam's holy places in Saudi Arabia. So how do you survive a disaster? The basic idea is that you should be prepared and learn what's going on in your body when a disaster is happening.
  4. We Were Soldiers Once...and Young: Ia Drang - The Battle That Changed the War in Vietnam. The book is describing the battle famous from the movie with the same name. If you saw the movie, you should still read the book because a lot in a Hollywood movie is different from what really happened.
  5. The new drawing on the rights side of the brain. If you can't draw pictures you should read this book. The basic idea is that those who suck at drawing are drawing objects, while those who are good at drawing are drawing shapes. The easiest way to draw shapes and not objects is to turn whatever you are drawing upside down. Now your brain won't recognize what you are seeing making it much easier to draw shapes.
  6. Structures: Or Why Things Don't Fall Down. Is a book about how you can design machines and buildings so they don't fall down. It's not a book you should read if you want to learn how to actual design so things don't break - the purpose of the book is to give an overview of the area, but it includes some formula you may use but no examples how to use the formulas. But the book is filled with interesting examples of how structures historically have failed.
  7. Helicopter flying handbook. Is a free book written by the US Department of Transportation and is a handbook written mainly for those who want to become helicopter pilots. It will tell you all about aerodynamics, flight controls, systems, performance, flight maneuvers, emergencies, how to operate a helicopter in different weather conditions, and so on.
  8. Unity 5.x Shaders and Effects Cookbook - Master the art of shader programming to bring life to your Unity projects. This book will teach you about shaders. It will not teach you everything about shaders, but if you are using it together with other shader resources you will learn a lot, including how to write a fur shader.
  9. Low level hell - A scout pilot in the Big Red One. Is a biography on and by Hugh Mills who flew a scout helicopter in the Vietnam war.
  10. Chickenhawk. Is a true story written by Robert Mason, who was a helicopter pilot in the Vietnam war. The battle dramatized in the movie We Were Soldiers was one of the battles he participated in. This book is considered being a handbook for helicopter pilots all over the world. 
  11. Troop Leader: A Tank Commander's Story. A biography on a tank commander in the battle for Europe in 1944 and 1945.
  12. Ambush Alley: The Most Extraordinary Battle of the Iraq War. Tells the story of a one-day battle in the 2003 Iraq war. If you have seen the television series Generation Kill, and remember when they are driving on a bridge and are seeing a burned out military vehicle, that vehicle was destroyed in this battle.
  13. Game Feel: A Game Designer's Guide to Virtual Sensation. Some games just feel better than other games, and this book is trying to figure out why.
  14. Guests of the Ayatollah: The First Battle in America's War With Militant Islam. Tells the story of when Iran took the American embassy as hostage.
  15. The New Science of Strong Materials or Why You Don't Fall Through the Floor. Is closely connected with the above "Structures: Or Why Things Don't Fall Down" but is more about the history of materials used in engineering applications. 
  16. The word of Notch. Is a pdf version of Notch's blog. Notch is the guy who came up with the idea behind one of the world's most popular games: Minecraft. 
  17. The Timeless Way of Building. If you have read this book you have learned a new way to think about architecture - why are some buildings "better" than other? The answer is that you should use patterns when designing a building. 
  18. A Pattern Language: Towns, Buildings, Construction. Is written by the same author as The Timeless Way of Building, but includes examples of patterns discussed in that book. I believe the guy who invented the popular game SimCity read this book and came up with the idea for that game. 
  19. John Carmack Archive - Interviews. Free book consisting of interviews with John Carmack, who created the games Doom and Quake.
  20. Why Did the Chicken Cross the World?: The Epic Saga of the Bird that Powers Civilization. Tells the history of the chicken.
  21. Rush to Glory: Formula 1 Racing's Greatest Rivalry. Tells the story of the Formula One drivers Niki Lauda and James Hunt.
  22. Pour Your Heart Into It: How Starbucks Built a Company One Cup at a Time. Is written by Howard Schultz, who bought a company called Starbucks that was selling coffee beans, and decided that Starbucks should also sell coffee drinks. 
  23. Uncommon grounds - The history of coffee and how it transformed our world. Tells the history of coffee.
  24. Color and Light: A Guide for the Realist Painter. Includes a lot of information about color and light mostly aimed for painters, but 3d artists will also find it useful. For example, the author argues that using only photos as references is not a good idea because a photo is not an accurate representation of the real world. For example, colors and shadows tend to be different in a photo, so you also have to go out into the real world.  
  25. Storey's Guide to Raising Chickens. Everything you need to know about chickens.
  26. Computational Geometry: Algorithms and Applications. A book on how to triangulate points, how to generate convex hulls, etc. 
  27. Leonardo da Vinci. Written by the same guy who wrote the official Steve Jobs biography.
  28. A Thread Across the Ocean: The Heroic Story of the Transatlantic Cable. Tells the story of the first telegraph cable from UK to USA.
  29. The Box: How the Shipping Container Made the World Smaller and the World Economy Bigger. Tells the history of the container.
  30. Shake Hands with the Devil: The Failure of Humanity in Rwanda. Tells the story, from a UN perspective, of the 1994 civil war in Rwanda.
  31. The Path Between the Seas: The Creation of the Panama Canal, 1870-1914. As the title says, it tells the story of the construction of the canal between the Pacific and the Atlantic ocean.

December 21, 2017

Computational Geometry - Part 2

0 comments
As said before, I've spent some time learning an area called Computational Geometry. This area is big (and some algorithms tend to be complicated) so I've still not learned everything. In this part I've studied algorithms that will cut polygons in different ways.

Sutherland-Hodgman. You can use the Sutherland–Hodgman algorithm if you have a polygon and you want to cut away the parts of that polygon that doesn't intersect with another convex polygon. The polygon you want to cut doesn't have to be convex. The result is the intersection between the polygons:


Greiner-Hormann. The Sutherland-Hodgman algorithm was kinda limited - it could only find the intersection of two polygons and one of the polygons had to be convex. It can be easily modified if you need the outside of the intersections, but the result is not optimal. If you have concave polygons (or convex or one of each) and you want do do other types of so-called boolean operations on the polygons, then you need another algorithm. One such algorithm is the Greiner-Hormann algorithm.

Intersection

Difference

ExclusiveOr

Union

That's it for now. Next up on the study-list is boolean operations on meshes. You can use one of the above algorithms if you want to do boolean operations on meshes, but better algorithms exist.

November 16, 2017

Computational Geometry - Part 1

0 comments
I've spent some time studying an area called Computational Geometry, which according to Wikipedia is "a branch of computer science devoted to the study of algorithms which can be stated in terms of geometry." Examples include: Are two lines intersecting? How can you triangulate random points? If you are interested in the area, the best book I found was Computational Geometry: Algorithms and Applications. The algorithms I've studied are:

Find the convex hull of random points. If you have some points and you want to find the smallest possible area that includes these points, then you need to find the convex hull of those points.



Triangulate polygons. If you have a convex polygon or a concave polygon, how can you triangulate them? 



Triangulate points. If you have random points, how can you triangulate those?



Delaunay triangulation. If you look at the images above, the triangles look kinda odd. To improve the triangulation you can use an algorithm called Delaunay triangulation.


Voronoi diagram. If you run a stores in different cities, then you can create a Voronoi diagram to find out where those customers live that live the closest to a specific store.


That's it for part 1. Next part will include boolean operations on polygons!

November 11, 2017

Books about engineering you can read on the beach

0 comments
Engineering is fun and it's also fun to read about other engineers so you can learn something from their mistakes and find inspiration. Engineering is also about math, physics, etc, but this is a collection of books without any math that you can read on the beach. So leave your calculator behind!


A Thread Across the Ocean: The Heroic Story of the Transatlantic Cable. One of the big engineering projects that took place in the 1800's was to connect Europe with America by dragging a 2500 tonnes heavy telegraph cable from one continent to the next. If that was possible, it would take just a minute to send information between the continents, compared to the weeks it took to send the same information with a ship. How this was possible is explained in the book.

Structures: Or Why Things Don't Fall Down. I've always been fascinated by those engineers who worked without calculators. How could they build a ship like Titanic without computers? This book will tell you the history of how to engineer buildings, bridges, ships, and much more.

Fermat's Enigma: The Epic Quest to Solve the World's Greatest Mathematical Problem. Math and engineering are deeply connected. This book will tell you the story of when one guy tried to prove Fermat's last theorem. It will also tell you the history of mathematics.

Clouds of Glory: The Life and Legend of Robert E. Lee. This book tells the story of one of the famous generals from the American Civil War. But little is known that Robert E. Lee was also an engineer, which is maybe the reason he was successful as a general? The book includes a lot about the war, but also about the engineering challenges to build a fort and change the flow of a river.

Wizard: The Life and Times of Nikola Tesla: Biography of a Genius. Nikola Tesla was a famous inventor, and one of Elon Musk's role models, but the problem was that he never made money from his inventions so he died poor. This book will teach you why great engineering is not the end goal - make money is always the goal.

The Martian. What if you are on Mars, then an accident happens which forces your team to leave you behind, so you have to survive with what you have until someone can rescue you? This is of course a made up story, but the author worked as an engineer before he began writing books so the book is realistic.

Alan Turing: The Enigma. One of the great engineering challenges during the Second World War was to break the German codes. He wasn't alone, but one of the persons who accomplished this was Alan Turing, and this is the best biography on him.

Moon Lander: How We Developed the Apollo Lunar Module. It might have been difficult to drag a telegraph cable across the Atlantic Ocean without the help of computers, but what if you want to land on the Moon with only primitive computers? This book is written by the engineer who was responsible for designing the vehicle that actually landed on the Moon, so you will learn all about it.

The Quest for Artificial Intelligence. Artificial Intelligence or smart computers are becoming an increasingly larger part of our life, such as self-driving cars. The area is actually not new, people have always tried to build smart machines, and this book will tell you all about it.

The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution. This book will tell you the history of the computer - from the first attempt to build a calculator up to the guys who designed Google. It is written by the same author who wrote the best Steve Jobs biography, so you should read both!

The Boy Who Harnessed the Wind: Creating Currents of Electricity and Hope. What if you grew up in a poor place in Africa and decided you wanted to help the community to get electricity. This book will tell you how William Kamkwamba built a wind turbine from scrap.

Skunk Works: A Personal Memoir of My Years at Lockheed. One of the most recognizable planes is the F-117 which was the first plane that was hard to detect on a radar - a so called stealth fighter. This book is written by one of the engineers who built that plane and other innovative aircraft at the company Skunk Works.

Masters of Doom: How Two Guys Created an Empire and Transformed Pop Culture. One of the most famous computer games is Doom, and this book will tell you the story of how Doom was created.

The Box: How the Shipping Container Made the World Smaller and the World Economy Bigger. This book will tell you the history of the container, so it's actually a book on logistics. But it's also a book on product development, and entrepreneurship because it turned out that it was businesses that decided to begin using the container before the governments began to use it for military purposes during the Vietnam War.

The Path Between the Seas: The Creation of the Panama Canal, 1870-1914. One of the great projects during the turn of the twentieth century was the construction of the Panama Canal. The first attempt made by the French failed because they ran out of money and because they forgot to take the human factor into account. Yes it wasn't easy to build the canal from a technical point of view, but it was even more difficult to keep the humans who were building the canal free from illnesses like malaria, so the workers (and managers) died in the thousands. There's also a great quote that says: "Engineers are sometimes the least practical of men, they may be attracted by difficulties." 

Nothing Like It in the World: The Men Who Built the Transcontinental Railroad, 1863-1869. Before the Panama Canal was built, it took 6 months to travel from the US east coast to the west coast. To shorten the time to just seven days they decided to build a railway connecting the west with the east. This books tells the story how they did that. 

And finally some shameless self-promotion. If you have read all books about engineering you should also read my book about engineering, which is a biography on Elon Musk: The Engineer: Follow Elon Musk on a journey from South Africa to Mars.

November 4, 2017

Would Leonardo da Vinci have streamed his work online?

0 comments
Television is 20th century technology and the new way to consume entertainment is to watch streamers on services like Twitch. A streamer is someone who is showing him/herself through a web camera while the person is doing something like playing a game, drawing a picture, or even looking for zebras in South Africa. Why? Traditional television has a broader audience, so the television shows tend to become kinda dull. Watching a stream on Twitch is more personal and you can even interact with the person through a chat. Streamers are also calming background noise, and I was listening to an art streamer while writing this article.

But watching someone else doing art is not something new. I've recently read a biography on Leonardo Da Vinci, written by Walter Isaacson - the same author who wrote the official Steve Jobs biography. He has also written a biography on Albert Einstein, and I've read all three of those books. In the book on Leonardo da Vinci, it's revealed that people were watching him when he was doing art, while he was saying "Drawing in company is much better than alone."
When Leonardo da Vinci was painting The Last Supper, spectators would visit and sit quietly just so they could watch him work. The creation of art, like the discussion of science, had become at times a public event. According to the account of a priest, Leonardo would "come here in the early hours of the morning and mount the scaffolding," and then "remain there brush in hand from sunrise to sunset, forgetting to eat and drink, painting continually." On other days, however, nothing would be painted. "He would remain in front of it for one or two hours and contemplate it in solitude, examining and criticizing to himself the figures he had created." Then there were dramatic days that combines his obsessiveness and his penchant for procrastination. As if caught by whim or passion, he would arrive suddenly in the middle of the day, "climb the scaffolding, seize a brush, apply a brush stroke or two to one of the figures, and suddenly depart."

Here are some other lessons learned from the book on Leonardo da Vinci:
  • You have to observe the real world and this is more important than learning from someone else:
    • If you look around you, you will not see any sharp lines, so why should you paint using sharp lines? "Paint so that a smokey finish can be seen, rather than contours and profiles that are distinct and crude."
    • Use shadows, not lines, and this is the secret to modeling 3d objects on a 2d surface. Leonardo da Vinci spent more time studying shadows (and thus light) than he did on any other artistic topic.   
    • Leonardo da Vinci took this one step further by dissecting human bodies to really learn how to make better paintings. Art and science is interwoven. If you paint someone, you should begin with the skeleton, then the skin, and finally add the clothing.
    • Study the movement of bodies. Many say that Leonardo da Vinci's characters are moving, and he said that "movements should announce the motions of the mind." If he met someone on the street with an appearance he wanted to study closer, he invited the person over for supper. 
    • To remember all observations, he always brought a notebook with him. In these books he wrote what he observed and what he wanted to observe, such as "Describe the tongue of the woodpecker."
  • He failed a lot. In some cases it could take 20 years before he finished a painting, and in some cases he never finished a painting he was working on. Leonardo da Vinci wanted is art to be flawless, so he could never finish them because they were so complicated if you took the lighting into account. In one case he had to dissect a body to learn how a muscle worked before he was satisfied with the painting.
  • Combine fantasy with observation. Leonardo da Vinci is famous for coming up with futuristic machines, like helicopters and tanks. But it turned out most of these machines were not meant to function because he created those machines for theatrical plays. If you want to draw a dragon, it's easier to combine parts from other animals, like the head from a dog, the eyes from a cat, the ears from a pig, and so on.
  • Procrastinate is not always bad. Leonardo da Vinci was having a discussion on how creativity occurs. Sometimes it requires going slowly, pausing, even procrastinating. "Men of lofty genius sometimes accomplish the most when they work least for their minds are occupied with their ideas and the perfection of their conceptions, to which they afterwards give form."