Circle and Square

Art, Code, Music, Mathematics

  • About
  • Art:31416kungfu
  • Curated Links
  • Jabberwocky
  • Music
  • OffCenter Apps

Generative Art

Posted by epsilon on February 4, 2019
Posted in: Art, Code. Tagged: elm-lang, generative art. Leave a comment

quad-blue-depth-11,q=247789pngOf late I’ve been doing some experiments with generative art using Elm, the functional language by Evan Czaplicki.  Above is one example.  It is created by repeatedly subdividing a square into quadrilaterals, modifying the colors as one goes.  A key factor is finding a proper balance between order and randomness.  For more details, see these notes.  The code is on GitHub.

The image above consists of 247,789 quadrilaterals obtained via 11 repeated subdivisions.  One would expect 4^11 = 4,194,304 quadrilaterals.  However, at each state there is a 20% chance for a quadrilateral to become inactive, and so not to be subdivided. This results both in more visual variety and fewer quadrilaterals.

 

BonsaiBot

Posted by epsilon on January 2, 2016
Posted in: Code, RPi-Arduino, Science. Tagged: arduino, bonsai, gardening. Leave a comment

BonsaiBot Mark IV (photos below) was put into service tonight after a week of development and testing. It measures and reports on soil moisture and waters the Bonsai when it is too dry.  The code is at GitHub. No documentation or circuit diagrams yet, but that is coming.

The sensor is made of two nails, spaced about 2 cm apart, which are driven into the soil of the pot, one near the corner, the other near the trunk.  Wires lead from the nails to an Arduino Uno, with connections to ground and analog pin 0.  Using a voltage divider with the soil as one resistance, a 100 KOhm resistor as the other, the Arduino monitors the voltage drop between the junction of the two resistors and ground.  A measure of “wetness” ranging from  0 to 100 is derived from this reading and displayed on an LCD. Using a knob, aka potentiometer the user can set a wetness level at which watering begins.

Watering is controlled by a relay connected to one of the digital output pins.  The relay operates a valve connected to a water bottle whose bottom it about 10 cm above the top of the Bonsai’s soil level. When watering begins, it runs until the measured moisture level is “wet.”  At the moment, watering is set to wetness 65, which is “dry’.  (Between “wet” and “dry” is “moist”).  Water is administered for one second every ten seconds so as to give plenty of time for it to be absorbed.  Seems to work.


40.714099 -74.007943

New York City

Posted by epsilon on December 20, 2014
Posted in: Uncategorized. Leave a comment

ft

Geometry in New York City

Posted by epsilon on August 15, 2014
Posted in: Art, NYC, Photography. Tagged: geometry, New York City, wall. Leave a comment

geometry

Nonsense words in Swift

Posted by epsilon on August 6, 2014
Posted in: Code. Tagged: nonsense words, Swift, Swift code. Leave a comment

I’ve posted some Swift code on github for generating nonsense words. The function patternedNonsense() generates pronounceable words like

1: hira-zansa
2: siqe-ratse
3: sifo-dassa
4: tixi-furse

The second, pureNonsense9() generates words like

1: gjoh-xkcri
2: xxgg-jjqfh
3: mxsv-tngwh
4: ftkm-aakif

Both functions use an extension to the String class that works like this

let alphabet = "abcdefghijklmnopqrstuvwxyz"
let digits = "0123456789"
alphabet.randString(4) + digits.randString(4)
// "njtu4428"

The first function makes use of diagrams, e.g.,

dgvc = ['in', 'er', 'an', 'at', 'on', 'es', 'en', 'ed', 'it', 'is',
'or', 'as', 'et', 'of', 'al', 'ar', 'ur']
dgcv = ['he', 're', 'ha', 'to', 'hi', 'ti', 'te', 'de', 'se', 'se',
'sa', 'si', 've', 'ra']

as well as a generic function randElement which returns a
random element of an array.

Flowers and Spiral

Posted by epsilon on April 5, 2014
Posted in: Art. Tagged: Art, flower, paper app for ipad, spiral. Leave a comment

paper_art_2

George Oakley’s Sonata for Cello and Piano

Posted by epsilon on March 29, 2014
Posted in: Music, NYC. Tagged: cello, contemporary classical music, george oakley, inga kashakashvili, Jay Campbell, Merkin Hall, piano, sonata, youtube. Leave a comment

From concert at Merkin Hall, February 9, 2014.

Inga Kashakashvili, piano. Jay Campbell, cello.

georgeoakleycomposition.com

Ganymede

Posted by epsilon on February 14, 2014
Posted in: Art, Photography, Science. Tagged: Ganymede, map, photography, US Geological Survey, voyager space probe. Leave a comment

ganymede_map3

Source: US Geological Survey

Ars Technica article

Image: a piece of the USGS image, processed using Pixelmator

Sonata for Piano and Cello – George Oakley

Posted by epsilon on February 8, 2014
Posted in: Music, NYC. Tagged: cello, concert, contemporary classical music, george oakley, inga kashakashvili, jay camplbell, Merkin Hall, piano. Leave a comment

Inga Kashakashvili, piano
Jay Campbell, cello

Please join us at our concert:

Merkin Hall
Sunday, Feb 9 at 7PM
129 W 67th street
New York City.

georgeoakleycomposition.com

The video above was taken with my iPhone 5s. Rehearsal at our place, January 31, 2014.

The Green Room

Posted by epsilon on February 8, 2014
Posted in: Music, NYC. Tagged: concert, contemporary classical music, Enchanted Garen, inga kashakashvili, Merkin Hall, piano, Richard Danielpour. Leave a comment

2014-02-07 13.20.48

Pianist Inga Kashakashvili trying out the piano in the Green Room, Merkin Hall.
Music: Preludes by Richard Danielpour – from The Enchanted Garden, Book II

Please join us at our concert:

Merkin Hall
Sunday, Feb 9 at 7PM
129 W 67th street
New York City.

Posts navigation

← Older Entries
  • Categories

  • Recent Posts

    • Generative Art
    • BonsaiBot
    • New York City
    • Geometry in New York City
    • Nonsense words in Swift
  • Top Posts

    • Harsh Pittie, in memoriam
    • Painting by 31416kungfu.…
    • Sapa, Vietnam
    • BonsaiBot
    • …
    • Isa Gentzen
    • Generative Art
    • Photo by Dylan…
    • Whither Classical Music
    • New York City
  • Pages

    • About
    • Art:31416kungfu
    • Curated Links
    • Jabberwocky
    • Music
    • OffCenter Apps
  • Archives

  • Blogroll

    • Camille's Sketchbook
    • Carlson@math
    • Film, photography, art, etc
    • HH
    • Lamington
    • Malika@SquareSpace
    • What would Eisenhower do?
  • March 2023
    M T W T F S S
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
    « Feb    
  • Category Cloud

    31416kungfu Art Code Film Mathematics Music NYC Photography Politics RPi-Arduino Science Travel Uncategorized Words
Blog at WordPress.com.
Circle and Square
Blog at WordPress.com.
  • Follow Following
    • Circle and Square
    • Join 144 other followers
    • Already have a WordPress.com account? Log in now.
    • Circle and Square
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...