I CAD do you? I Probably do it different

The Mandelbrot Set

I wrote this and put in on linkedin on September of 2017. I have been thinking about this lately. I am surrounded by people that just don’t get “IT”. I still like this one it was fun to write.

If such a thing as an amateur computer scientist exists it is something that I would like to thought of as. Only on one occasion has it been my “job” it made me crazy. So for most of my life my “job” has been in some shape or form related to engineering and manufacturing. Don’t get me wrong my skill with computers is my vocation but, frankly from a theoretical sense what computers are used for in engineering is pretty boring. I have a great deal of fun writing about little gizmos that can be had for a pittance and how powerful they are for the buck. I do however and always have had a real penchant for turbo belchfire scorching brute force computer power. I still have a few of my hand made carefully specified workstations and would not personally use a machine I didn’t build.

Once upon a time the biggest baddest fire breathing beasts were used for CAD. Today it can be comfortably done on a mid ranged system as long as you aren’t trying to model complex things. My last cad station was a dual Xeon 3 Ghz machine with a Nvidia 3800 in it. A respectable machine no doubt. In fact I have three of them. I’d like to get several more before too long. I’ll get into that later. I bring it up because when I did a 240 room nine story barracks on it things got real creaky. In fact I could only do one floor per drawing because things just got a bit too laggy. I started drawing just because it gave me access to good gear and more significantly much cooler computer systems.

The first version of AutoCAD I used was release 9. It was the second release of the software. Why it was called 9 you will have to take that up with Autodesk. It came with like a dozen manuals. All of which I read cover to cover, some several times. It is during this time several very cool computer concepts came into focus. First and foremost is the idea of vector versus raster graphics. It may not be common knowledge but ACAD was always a 3-D system. It even included the standard primitives minus the Utah teapot. So while the less informed may have thought I was sitting in the corner drawing and learning how to design control systems my agenda was quite different, I was discovering procedural vector graphics organized into a database which parsed and projected vector data onto a two dimensional plane and displayed on a raster screen.

Graphics have always been my thing. Back when I was surreptitiously advancing my personal interests while appearing to do stuff engineers thought was useful I was also discovering fractals by reading a book by James Gleick called “Chaos the making of a new science”. A book I recently discovered a fellow by the name of Loren Carpenter also read and credited with the inspiration of his co-development of the Reyes renderer and eventually RenderMan which led to him being a co founder of Pixar, A very cool thing because the book had a big impact on me and, apparently I’m not alone. Anyway one of the key concepts in the book is a thing called the Mandelbrot set. I wont go into it other than to mention a 30 line piece of basic code took 90 hours to render on my 2 Mhz graphics computer a pretty state of the art computer back in 1980’s. I was hooked on procedural graphics from that point on.

Computer graphics is a vast subject. The mechanical means by which they are projected onto a flat surface is fascinating. It involves vast memory pools, interpolation algorithms and zillions of arithmetical calculations. A simple 1080p video display consists of 2,073,600 pixels. So every image displayed must at the very least require a data stream of over two million data points. A standard refresh rate for a display is 60 Hz. So multiply ~2×10 to the 6th x 60 and you get a very big number all of this occurs 60 times per second. Now color depth is another matter a standard “true color” is 24 bits or 3 bytes per pixel so the amount of memory is 3 bytes per pixel so an image or frame requires just under a gigabyte of raw data. Now of coarse while you are displaying one image you are buffering the next one in the background so double your practical memory need. With all that is it involved it is easy to understand why a processor capable of three billion operations per second can get bogged down to a crawl rather quickly when playing with graphics. This is only a cursory look at the mechanics its not even starting to get fun yet. It is important because most people hit the on button and it just magically works. Script kiddies just wanna be creative geniuses and have no basic understanding of the underlying task.

Okay, now lets talk about vector or procedural graphics. I was using them long before I actually understood what they are. A vector is a geometrical concept used to describe a line segment. By definition it has an origin, direction, and magnitude simple as that. Now if you create 3 vectors with 3 vertices you have a triangle, the most basic form of surface you can create. Any other shape including quadrilaterals consist of combining triangles. Many times in 3-D parlance the shapes are just referred to as polygons. A cool thing to do besides draw pictures of a porch you want to build is to orient polygons in a theoretical “space” set up a point of view shoot theoretical rays not dissimilar to radar and use that information to project the result onto a flat plane and plot it. This is CAD. Go a step further and paste a theoretical surface on the polygon and texture it either procedurally with a bitmap (read raster image) and now you can create things that appear to be “real”. Go a little farther and add characteristics such as mass and then you can do procedural simulation. A little beyond my current depth but, I have toyed with physics engines and do intend to delve into them once my mastery of this topic is closer to complete. I could go on about Rend386 and POVray a couple of open sourced programs developed in the mid eighties, they are worth mentioning here because it was my first experience with these concepts and provided a base for my current understanding of the computer science of generating graphics.

In computer science there is a concept called embarrassingly parallel. Very few things meet this criteria but, rendering polygons is one of them. Years ago I got sick and tired of flat boring monochrome line drawings. I had literally drawn thousands of them. I decided to concentrate on 3-D. So then Engraf was created to pursue this goal. Back in ’02 mid range boxes were sporting 1 Ghz processors and if you look into it you will discover it takes very little geometry to bog down the frame rendering rate to a crawl. However if you use two machines it takes half the time, four would half that time again and in theory you could continue to half the time off into infinity. Alas though the exponential nature of the power of two gets cruel and expensive rather quickly. So Engraf never really left the developmental stages.

Since then multi processor multi core systems have become more affordable. So now the key element is coming down to the human element. while still not cheap is the human capital that is now the real expensive element. For the past ten years all I have done is model 3-D. Of coarse someone paid me to do it because while my agenda was in the background in the foreground was helping someone make money and meet their payroll. I like win win and don’t subscribe to the concept of zero net gain. Of coarse now they got these cool scanners that create point clouds but, that is a whole other graphics topic for some other time. So yeah, I CAD but probably not how you think even, if you CAD too.