Recently I've been looking at Povray, pyprocessing, and cfdg (version 3.0) as tools for creating digital images. I have branched two separate blogs where I mainly explore jruby + processing and

Monday, 30 July 2012

Setting up Netbeans-7.4 for processing-2.0

Navigate using the tools button in menubar, then the click on the libraries button in the drop down menu.
Create new library (processing or processing-2.1 would be a sensible name, but I have just used processing below to match ArchLinux). Add the appropriate jars for your OS/architecture see below for a snapshot of my 64 bit linux setup.

Screenshot of ant libraries manager set up for development with processing.2.1 on ArchLinux

To add the library to your netbeans project, right click libraries in the project view window and add the library you have just created, see screenshot:-

You can get template files for developing processing here.  The easiest way of installing these files is to copy them to the .netbeans folder, which you will find in your home directory. There will be  a subdirectory 7.4, a further sub-directory config. If there isn't a Templates folder in that directory, then create it, and similarly create a subdirectory Classes. Copy the three java template files into this folder.  If .nbattrs doesn't exist copy this one there or edit the existing file appropriately. Install the processing.png icon in the Templates folder.

Path to template files in home folder:-


Assuming you also have a standard processing ide setup then you can add contributed libraries in a similar way, see my peasycam entry below, NB click on images to see full size:-

Creating a ant_library for a "contributed" processing library

Tuesday, 10 July 2012

Context Free Art 3.0 release

Previously I have created this pattern of tiling that resembles that at the Alhambra Palace in Granada using CF version 2.0 and pre-release version 3.0. This version features the additional transform instruction that can be used within a path (used to create white hexagons here). Linux users will need to compile their own version of CF3.0, and there is a new option of compiling in Quicktime movie support. I've yet to figure whether it is possibly to create a live movie by piping CF3 output to say dragon player, but it might be possible. You will need to compile ffmpeg as per instruction in the ffmpeg-source/README to get quicktime support. I've updated my jEdit commando file to make it possible to choose Quicktime output.
CF::ColorDepth = 16

startshape alhambraIII
CF::Size = [s 6 6 x -2.5 y -3.5] 
CF::Background = [b -0.22]
TTOP = sin(30)/sqrt(3)
HEXS = sqrt(3)/4

GOLD = [h 33 sat 0.967 b 0.592]
BLACK = [h 0 sat 0.909 b 0.129]
GREEN = [h 148 sat 0.696 b 0.271]
BLUE = [h 225 sat 0.777 b 0.475]
RED = [h 17 sat 0.983 b 0.231]

shape alhambraIII{        
  loop i = 0, 10 [x 1]{
    loop j = 0, 10 [[y (HEXS * 2) x -0.5]]{
      triangle[trans select(mod(i, 5), GOLD, BLACK, GREEN, BLUE, RED)]
      hexastar[[x -0.5 y -0.29 s 0.33 trans select(mod(j, 5), GOLD, BLACK, GREEN, BLUE, RED)]]

path triangle {
    MOVETO(0.5, TTOP)
    loop 3 [r 120]{ 
    CURVETO(0, TTOP, 0.25, -0.05) 
    CURVETO(-0.5, TTOP, CF::Continuous) 
    transform [s 0.20 r 30] {
    MOVETO(cos(30), sin(30))
    loop 5 [r 60] LINETO(0, 1)

shape hexastar{
  TRIANGLE[r 90]
  TRIANGLE[r 270]

CF3.0 Output
Here's another tiling I might generate?

Here is the code I created to generate that design, now I just need to wrap it around a column.

startshape start
CF::Size = [s 6 5.2 x -2.7 y -2.2] 
CF::Background = [b -0.22]

// compromise colors with matching sat and brightness
GOLD = [h 33 sat 0.77 b 0.271]
DKRED = [h 0 sat 0.77 b 0.271]
GREEN = [h 148 sat 0.77 b 0.271]
BLUE = [h 225 sat 0.77 b 0.271]
RED = [h 17 sat 0.77 b 0.271]

shape start
  loop 2[x 5.56 flip 90]four_column[]

shape four_column
  loop 2[x 2.38 flip 90]two_column[]

shape two_column
  loop 2[x .79 flip 90]column[b .3]

// alternate left and right pointing tee
shape column
   loop i = 0, 7[y .88 flip 90]tee[r 90 trans select(mod(i, 5), RED, BLUE, GOLD, DKRED, GREEN)] 

// path of a vertical tee
path tee{ 
  MOVETO(0, -.39)
  LINETO(-.2, .07)
  LINETO(-.44, 0)
  LINETO(-.49, .21)
  LINETO(0, .39)
  LINETO(.49, .21)
  LINETO(.44, 0)
  LINETO(.2, .07)
  STROKE(0.04)[b -0.05 sat -1]
CF3.0 Generated tiling


Blog Archive

About Me

My photo
Pembrokeshire, United Kingdom
I have developed JRubyArt and propane new versions of ruby-processing for JRuby- and processing-3.2.2