Wednesday 31 October 2018

Making Some Trees

I like many other types of programmer enjoy 'hacking'. Hacking is a process that I like to think of as a quick iterative process whereby code is written swiftly to achieve a proof-of-concept, quite literally hacking things together until it works, without worrying about UML diagrams, unit tests, or other programming 'jargon'.

This blog post details my first attempt at generating trees algorithmically in 3D using open Frameworks.

The first thing I tried was simply to stack cone shapes on top of one another, with a random width and height. I used the constructor to simply stick 10 cone primitives into a vector, which then gets drawn inside our draw() function.




The first improvement was to change the shape primitive to be cylinder instead of a cone and join each cylinder together.  Also reducing the width of each section as the tree gets taller.




Trees in practice don't grow straight, so another thing I tried was applying a random amount of rotation to each section, 5 degrees in each dimension (X, Y, Z).


My idea soon became a lot more challenging, as joining up cylinders in 3D and rotating them requires a lot more maths that my naiveness first envisioned. Also sometimes things don't go to plan but still produce amusing effects (see below).




Firstly I went back to 2D, which is easier to understand. Starting at a point, generate a random length and angle, workout the end point of this line by using the point on a circle's circuframance formula and you end up with this.


We can now apply this to open frameworks, but posting a cylinder on the midpoint of each line section. Starting to look a little more tree trunk like.




And another with two trunks!





Time to add somre branches.












Monday 22 October 2018

Similar Systems

This blog post looks at and explores previous installations, that are similar in nature to this projects proposed system.


Funky Forest


Theo Watsons, 'Funky Forest' is an interactive ecosystem whereby participants can create trees by making different body shapes. They are encouraged to keep the trees alive by diverting flowing water to them through 'live' waterfalls that are part of the installation. The project is primarily aimed at children. The system was created with openFrameworks.



Image from here

Tree Planet

Tree planet is an that allows people to plant and grow a virtual tree.  The in-game actions have a real-world outcome, whereby should a user grow their tree successfully a team will plant the tree in real life. Tree Planet's overall vision is to help save the planet, by curbing some of the effects of climate change by using trees to soak up excessive CO2.


Image from here





Thursday 18 October 2018

First Post


Hi all and welcome to my first blog post. This blog will act as a digital research journal in which my journey through the Creative Technologies Toolkit module will be documented.

The brief for the module requires one to "research, design and develop an interactive Audio/Visual system based upon some aspect of nature in or around Bristol." The brief also states that it must engage children and be designed and installed in Bristol

Since I live in Bristol and next to a large nature reserve, I decided to conduct some field studies of the reserve.

The Bradley Stoke nature reserve is situated in the north of Bristol and is positioned between many housing estates, schools and local business, sitting right in the heart of Bradley Stoke. Its origins are both from natural woodland and farmland through to man-made lakes, rivers, and large hill created as a result from the spill from the construction of the second Severn crossing.  As a resident of the area since 2014, I have enjoyed systematically walking around the area in early mornings. The area is enjoyed by many others also, and is close to many local primary schools and nurseries, and is frequented by families with young children.



Bradley stoke in North Bristol


Outline of the Bradley Stoke Nature Reserve



My initial idea for the project is to create an installation that allows people to scan leaves from the local trees and in turn software will synthesis a tree from a data representation of this leaf. Such a tree can then placed by the user in a virtual world using on-screen controls, to grow a digital forest of trees, created from many different users. This is aimed at encouraging children to collect various leaves from around the reserve and see how these grow into digital 'out of this world' trees. The installation will react to the outside environment from temperature, humidity and wind speed to have real-time effects over the virtual forest. 

While exploring the area it was important to consider the area in which such an installation might be installed. I considered three main areas, shown in the map below.



Map showing three possible areas for installation





Map of the local area.


Location 1

Location 1 sits between a large retail centre and Ormonds Close. It is also on a footpath that links the main woodland area and the large meadow.




Location 1


 Location 2

Location 2 is right in the heart of the woodland area and is surrounded by a variety of trees. This area is slightly off the beaten path but provides ample room and natural seating areas.


Location 2

Location 3

Location 3 is positioned in a popular area of the reserve, that links up several footpaths and housing estates. Furthermore, it is next to a large duck pond and is popular with families and children. It is also close enough to local infrastructure for utility needs (i.e. power). 



Location 3


This large hardstanding area is an ideal place to place the installation.