Archives April 2021

One-A-Day: Qtips

Today’s example is short but sweet. It creates a design made out of a bunch of qtip-like ‘sticks’ with balls on the ends.

It is a design made out of ‘almost squares’ (four sides each at an 85 degree angle to each other). The turtle then turns right 5 degrees, and slides left 20 before continuing to the next almost-square.

Each side of the almost-square is coloured based on its iteration in the almost-square loop, and the fill colour of the balls is set to match. Also, each iteration is raised an amount relative to its iteration, creating a pleasing 3D effect.

Click here to open the project in the viewer or open it in the webLogo IDE

TO qtips
  hideturtle
  clearscreen
  repeat 24 [
    repeat 4 [
      penup 
      setz repcount * 3 
      ;raise up the turtle based on the loop count
      pendown 
      setpencolor 10 + repcount
      ;set the pen color based on the loop count
      setfillcolor pencolor 
      ;for the spheres
      icosphere 2 
      rope 100 
      ;a rope is a cylinder-based line
      icosphere 2 
      right 85
    ] 
    right 5 
    penup
    slideleft 20 
    pendown
  ]
END

New WebAssembly Build of turtleSpaces Logo Now Available

To make turtleSpaces more accessible to our users, we’ve created a WebAssembly build of turtleSpaces and paired it with a new Javascript front-end UI that renders turtleSpaces output natively in the browser, and has a code editor with syntax highlighting.

It comes with a number of built-in examples, and a fairly complete set of features: loading from the local machine, saving to the local machine, exporting STL, exporting PNG (high-resolution), and sharing using the turtleSpaces model viewer (which unlike STL is in full color).

Obviously execution in the web interface is slower than if you download the native turtleSpaces binary for your operating system, but our webLogo still provides most of the functionality of turtleSpaces while making it available for other platforms such as Chromebooks, Raspberry Pi 4 and so forth (anything that can run a Chromium-based browser).

And, because it is 3D, and has dozens of shape primitives, our webLogo still offers far more creative opportunities than other Logos.

Check out the webLogo here!