My First Plugin: Spirograph
-
There is a certain condition when it makes a double line. That needs to be corrected, but for now, this is just something to play with.
-
An adaptation ?
-
I just bought a used Spirograph for my daughter for Christmas last year. Great toy.
-
You must make some examples with some numbers and give us because if you take some big numbers you can only make Alt + Ctrl + Del
-
The plugin is still in beta. I guess you guys are the beta testers and didn't know it .
Unfortunately, large settings crash your system. I'll have to put in some sort of limit to what you can put in. I tried to get around the problem by making one curving segment, and then using a rotation matrix to just rotate the segment to save memory, but that hogs up as much memory as just doing the design in one fell-swoop.
Also, I'm using groups, but what I should be doing is using edges. This way it will be easier to add colors using the paint brush. For the examples below, I cheated by PrintScreen and then adding colors in Paint.
For now, look at the pretty colors. Someone out there might want to use it for a kid's room or something playful.
-
For people just getting started with plug-ins, here's how you use one:
-
Download the plug-in attached to the thread's first post.
-
Click/drag it onto your desktop.
-
Open any folder, and go look for where Sketchup's plugin file is kept on your computer. On mine it's in C:\Program Files (x86)\SketchUp\SketchUp 2013\Plugins
This is also called a "path" in computer lingo.
Your path should be something similar. This is where you get to add features to your copy of Sketchup.
-
Drop the Spirograph.rb file from step 2 into that folder. You have to re-start Sketchup to use it, because Sketchup only loads plugins at start-up.
-
You should see a Plugin called "Spirograph". Try some settings like:
16
8
7
20and have fun.
You can easily crash your system if you over-burden it with too many segments. Every curve can be reduced to line-segments, and "segments" is the setting you change to get a smoother effect. Too much smoothing will result in a system crash. It's sort of like that sandbox tool. It doesn't take too much to crash the system if you have an average-speed computer like mine. (For you pros using a graphics card of something, that probably doesn't apply.)
20 is a good number for reasonable smoothness for segments.
Anything above about 30 for the fixed radius is a bit much too. You don't end up with a nice design anyway, but a dense mat of lines/edges.
At some point it may be possible to use some C++ code to do the heavy multiplications internally done in the plugin to reduce crashes, but for now, I'm using the convenience of Ruby at the expense of system resources.
Pretty cool, huh? Takes you back to when you were a wee-lad and using those sharp-pins that held down the fixed radius. They wouldn't allow any sharp edges in any toy today, now would they?
-
Advertisement