Friday, September 15, 2006

Now macs have all gots webcams, and seeing the current trend towards really shiny GUI buttons, why dooesn't Aqua now have buttons that really reflect what is going on in the room?

Right, I had a good go at lush and after too many errors I'm giving up. Not enough documentation - the Ogre toolkit looked awsome but without any documentation I thought I'd rather be back in Java. There were too many random crashes for my liking but Stack overflows are to be expected tho!:

? (fib 6000)

*** printf : sorry, stack full (Merci Yann)
?


My next effort is to get the jacol libary built under os x.... The plan here is to use the (if not) excellent (then slow) swing and jMonkey libaries from inside clisp. From what I can tell it (like lush) has been abandoned, but since I know a little Java I figured it was worth a go.

First up this error shows up after ./configure --prefix=/sw/bin (cause I'm a fink user) and doing make

;; Compiling file /Users/tomkelly/Desktop/jacol-0.33/lib/md2.lisp ...
*** - invalid byte #xE9 in CHARSET:ASCII conversion

Tis a character encoding thingy (guess the old version of clisp wasn't utf8 friendly). A little searching showed and answer in an old log page. So it seems to build if you change the 'pre:' section in the Makefile to (alternative fix)
...
pre:
clisp -q -c build.lisp
clisp -Efile ISO-8859-1 -Eterminal ISO-8859-1 -Emisc ISO-8859-1 -q -c ./lib/md5.lisp;
cp ./lib/md5.fas ./src/lisp;

rc:

...


next up I didnt want to install this fly by night (read: no native os x) thing onto my system (and beside make install didn't really work). I changed the jacol-0.33/bin/jacol script by replacing the relevant line with:
JACOL_HOME="../"
then I could start the server-
/jacol-0.33/bin$ jacol -jp 2424 -s
Java server listening on port 2424
Lisp server listening on port 16763
To get me a java server running on port 2424. A basic test says it works - woo!
~/Desktop/jacol-0.33/examples/dates $ ../../bin/jacol date-formatter.lisp
18:46:03 2006
September 2006 AD
The time is 06 46 04
Your time zone is BST
Your time zone is also British Summer Time

But I did end changing the /bin/jacol script file to point to the absolute location of JACOL_HOME. Guess I'm just a linux l4m3r...swing demo works too -


(I always have to get one picture into a post....) Right, so now what do I have to do to be able to call java fns from inside the clisp interactive environment thingy?

Then I decided that I've got way to much free time at the moment for it to be this easy, so I'm trying to write my own socket based RMI for lisp. The trick is with these things to make sure that someone else you can talk to has finished the same thing, or that there are lots of people doing the same thing around you doing the same thing.I have neither - most of the lisp/java crossovers are abandoned....

Monday, September 11, 2006


"The Starcraft AI isn't very I"
"...but it's kinda A"

Here's a thought, if you have a very small circular polygon, and grow the edges outwards (camp skeleton stylee) then it is just an approximation of a Voronoi:

If a and b are polygons and we give each edge a negative weight then where they intersect we get a voronoi tesselation of sorts. By giving the sides different negative speed we immitate a voronoi where each point has a shape that grows out of it. (We could even change the shape as it grows outwards, but thats getting ahead of ourselves)

Now of course this is pointless (as the voronoi has a lower time complexity) for circles. However if we wanted to create an interesting brick wall, instead of circles we could use brick shapes... suddenly we are in the situation where we can grow interesting bricks to fit the shape of the walls. So different shaped bricks can be mixed and matched with suitable input polygon generators.

(from a punt in cambridge, just downstream of the mathematical bridge, or rob's version)
(tower of london from the river side)
There is still a problem when we then get to texturing corners. As explained by Legakis, 2D texturing dont work right on the corners of buildings:


His approach was to cut the building up into a bunch of lego (more like duplo) blocks (funny that he ended up needing a straight skleton implementation to shrink the mortar between the bricks in correctly) . Each block was then textured according to its meta data and situation eg 'next to a window and on the side = this type of block'. This doesn't give much scope for interaction between the bricks, but it does look like a really fast algorithm!

There's some serious potential for improvement here - we push the camp skeleton into 3D and then give it an input volume (bounded by the outer wall and a shrunk wall thickness). Then we create brick shaped (tiny) input polygons in the centre of the bricks and let them grow outwards into one another to fill all the spaces. We get a nicely tesselated brick wall out of it! We'd need to remember to set different speeds on different sides to keep a proportioned brick shape -

(grey are input polygons with various negative weights, other bold lines are camp skeleton output-should extrapolate to 3D too....)
This is too much detail for today's graphcis cards, but from this we could render the bump/displacement maps to make walls look really good. There would be some work in defining where the centre of bricks would go, and possibly the need to tweak Felkel's skeleton implementation to give priority to one brick after an intersection (to keep them square) but it should all work kinda nicely in the end....

I guess we would let the brick volumes intersect, then shrink them back in again to create the morar. The outside surfaces could have a roof-like straight skeleton applied to them to make them bevelled.

Well thats enough work for a pHD, but I've been thinking about this and I think Bristol has left a giant gap in my education - working with other people (who arn't nerds). Think its time I got a job behind a bar.

Random thoughts:
  • If a straight skeleton is created, then we can take another line pattern, say a 'curve' and exturude it along the edges of the skeleton? It wouldn't change the intersection points and would need to be scaled for the different weights, but it may be a faster way to make more complicated rooves:
  • People keep comming to this page for a straight skeleton implemetation (often in java). I think I'd better write one that I dont mind publishing. Think I'll get all the ideas correct in lush first and then throw it into java. I tried seperating out my code from sity the other night, but was far too tightly coupled to get it out gracefully (and its crap).

Sunday, September 10, 2006

Now onwards! just having a go at getting lush to compile on my mac/os x 10.4. Why? well I'm a convert of paul graham's and want to learn lisp, but I'm also into graphics so lush seems about right. I'm a little concerned that it doesn't get updates more than once a year, but may well be a fun toy.

Finally got it built by following the readme and the obvious google links. Once it I was trying to run the demos I kept getting errors like this


*** error : cannot configure OpenGL
libglut.so could not be found.
please make sure GLUT or libMesaglut3 is installed.
Both the library and the development packages are needed.
(see /Users/tomkelly/Desktop/lush-1.2/packages/opengl/opengl-config.lsh for more details)


turned out I also needed to fink install glut, sdl-image & sdl to get the correct .so libraries to run the demo. I just installed it locally to try it out, then ran the lush1.2/demos/RUNME script and it gave me a neat (if slow) menu. I was kinda supprised how little code made the menu (compared to say - java & swing).


Really neat stuff - I gotta learn lisp and learn it good. I've got two things I want to work on nowish -
  • Terrain generation. I've just started reading papers, such as those about the ROAM algorithm - seems really compact algorithm for regular terrain meshes. I kinda invented it in my head the night before, realised how obvious the idea was and then found it online. Realtime mesh decimation (with things like animated deforms or 3D objects) seems like a fun thing to do. Annoyingly the US is way out front in this with the Lawrence Livermore Labs turning out some great papers. First thing is to look through the options - the types of decimation (removing a point, edge or triangle) in combination with organisational schemes (bintrees, octrees, triangle trees or BSP), ideally being able to plug each into each other to get some quick readings would be neat - perhaps lush will help me out on this. It'd be cool to come up with a non-regular mesh decimation technique that allowed for real-time deformations and animations...
  • A rigerous camp skeleton implementation would be fantastic and would be a really good start for a rewrite sity. General plan would be to work out the details, implement it and get it right in lisp then take back into java.
Come to that I find that graham is really into the web based apps, makes me feel a bit out in the cold...all the stuff thats really heating up at the moment is the web sheneagoats. Perhaps I need to get into the games market more - nah working in games would be too much like hard work after all those rumours of how hard they push people at EA.

Blogger rant - would it be that hard for the bloggy people to make uploaded images appear the cursor position? ;) Still I really like the beta version!

Sunday, August 27, 2006

Right, got thesis all printed and is now being bound. Will put it in the post today, but Mike gave me a longer deadline. Still no news on when/if I have to come and present it...

Just trying out google base, (woo for free file hosting by google). But has totally failed to upload my 10Mb pdf 4 times, from my pc and from another http server.

Now No. 3 on a google search for sity...Will put thesis online in a couple of days...

Lol, just added a hit counter to the bottom of the site, two interesting developments already - This is the top result for a google search of "pages like utube" and David Eppstein has a link to this page. Well that and I get 2 hits a day ;)

Finally also found the original straight skeleton paper. Was only invented in 1995...

All printed and done. Waste of paper if you ask me...

Tuesday, August 22, 2006

right, time to get some test renders out of this mess!-







Strange thing is today I only just used java's do...while construct for the first time. I think thats very wrong, just goes to show that convention can be damaging. It would have solved some ugly cludges I've put in, and made the code much nicer and simpler. Since if you thinking about ugly code your not thinking about what your doing it just goes to show that the language you think in does effect your results.



I switched to the beta version of blogger today, seems to have fixed my two gripes with blogger - the 80% failure rate when uploading images and the strange need for republishing to static pages. Big up guys!


oops, oh dear it looks like the pirates beat the straight skeleton in the google video download charts (however google is beating uTube 2:1 for pirate video hits, and is also not-quite-as-bad-a-quality-as-youtube):



Title Page Views Downloads
Fairy Lights 40 1
Voronoi computation 9 0
big test render 12 0
camp skeleton 30 0
crazy clown land 11 0
first city flyby 53 0
irregular weighted straight skeleton (camp skeleton) construction 22 0
more pirates! 469 4
mungo 12 0
night glow 6 0
pirates ahoy 800 6
straight skeleton animination 47 0
straight skeleton eve demo 38 0
trippy debugging 242 1
vornoi tesselation art 9 0
weighted straight skeleton 26 0
weighted straight skeleton 33 0
Totals 1859 12

-

I've wasted minutes of the lives of 1859 people...


Monday, August 21, 2006

First attempt at mental ray on a large city:

The city wasn't really worked on (that would take weeks to get right) but shows a lot of the types of buildings you can make with it - from overhanging rooves to flat ones with walls. A little silly because the rooves run into each other, and a bit too bleached out but its a good start. I'm considering leaving the streets without geometry just to add a bit of contrast...

Most of today was spent botching together some roof code so it works consitently enough for large cities. Tomorrow I'm going to make a proper grammar (now load and save are working) and see if I can get a 1Km square render out of maya....

lol also found the remote command to run maya over the network:
/usr/aw/maya/bin/Render -im ~/../mental/new -r mr -v 4
-x 600 -y 600 -of tiff -cam persp -rt 4 filename.mb

works great for a 600 square image in filename.mb using 4 threads and mental ray (mr) to a tiff file called "new".
Not quite sure how to set up final gather settings, I'm hoping they are in the maya binary you send. I know from last time i ran the command "y > /tmp/file" (go on try this....) on snow that i've got at least 4GB of tmp space to render tmp images into, and that snow doesnt clean or limit access to the tmp folder. This may be useful for animations at a later date.

Wednesday, August 09, 2006

Finished writeup of the straight skeleton last night, although I could add an extra section about straight angled corder and weights, It seems long enough as it is!

I think i've got mental ray figured out, it all seems to be about the ambient light and final scatter. Looks really nice doesnt it?

I'm giving a quick description of the Voronoi tesselation and then onto a description of Sity's grammar. Thats going to involve lots of horrible diagrams and explinations of my meta data system.

Found another insntance of the Holyer effect - "concave voronoi", damn self refencing internet. I demand a DAG replace the web.

I wonder if theres a convention for quoting the source from whom you copied the reference from using google scholar? If you get an ammusingly-authored reference into google scholar, I'm sure you can get hundreds of published papers to quote "Sutherland and Cohen - the use of scissors in line clipping (1968)"

Right I reached what I thought was my goal for the word count by midday on Wednesay, I'm so not going to write another 12K words in the rest of the week, but hopefully make a lot of pretty pictures (worth at least 1K words each)

I've also just found out that:
  • Rob's got Maya 7 and mental ray installed on snow
  • snow's got 2 processors
  • snow's got 5GB memory
  • no one is using snow in the holiday
  • you can run maya from the command line
This means that there is a chance I can render out a massive image of an entire city in mental ray. Everything in mental ray looks cool. Lol then again if only I could get into the graphics department's cluster, I might be able to match the resolution of the printer that sits behind colin

Hmmm... have just realised that UML just isnt designed to deal with reflection gracefully, expect lots of annoying notes saying what a connection really it!

Well end of today and I'm up to 14K words, 45ish pages, 4 appendices (although one is naff) and 2 pages of references . There's a 50 page limit, so I guess its time to make constant references to an appendix to annoy the reader. It may even be sensible to put all the results into an appendix. Should be able to do all except the user guide and results tomorrow :)

Tuesday, August 08, 2006

Lol woke up to find my mental ray rendering option had dissapeared, luckily this post was near the top of google results! Yay for mental ray!:
Still not quite sure how to get the perfect images that you see in some the publications, I cant find the ambience bounce option that is present in mighty radiosity...

Wrote a lot of words today about the straight skeleton hoodicky. Now up to 9.800 words and 30 pages. Lets hope the rest is a little more brief, some could be cut out to the appendix, but a lot of it is my own work built around someone elses so i dont really want to relegate it that far. but anyway it looks like I'm over half way to the thesis 'minimum' of 50 pages. Its a bit of an arbitrary limit.

It was one of those days when trying to concentrate on any one section would just result in me adding more to a different, unconnected chapter. Not very good really.

I did however manage to use the phrase "hollow point" and produce a reasonable argument to name my modifications to the straight skeleton as a "camp skeleton"

I just realised that I dont really want to give the source code of the project to anyone. It does seem kinda childish, I guess I thought about this when I signed up for a degree but dont remember now. It feels like its all my work, and since I'm paying Bristol for tuition it feels unfair that Bristol owns the IP to the work. I wonder if this will change when they start screwing (I guess they've already started) students out of more tuition. It would certainally make bristol's business credientials (its outstanding positive feature) more plausable and attractive to business minded students. But I guess I'll leave it up on the website for a while. I think the critical thing here is that there is no work here that couldn't be hacked together by a C guru with the right libraries in 24 hours...

To be honest for the amount that they are charging students to go to bristol my honest advice for computer scientists is to move to california and use the same money (as an in-state student) to get into one of the UC campuses near silicon valley. People would become much better scientists in that culture, and have a the inside track to a dev job with one of the big companies over there (unlike being a sales and marketing monkey if you join in the uk).

Monday, August 07, 2006

Lol, righty ho last dev day today, so time to crank up the outputs.


I can now have buildings with overhanging rooves, ridges marking the boundries between stories and different walls with different slopes.



In breaking news, a google search for sity no places this blog at number 4. In your face sity communications. I guess thats what you get for having a blog with google...good rankings even if no one links to the blog!

Tomorrow I'm starting writing up. I think I should have a reasonable draft to show colin by the end of the week (then I'm off on holiday for another week)...Chapter headings to include:
  • research
  • voronoi
  • straight skeleton
  • overview of method
  • gui
  • engineering
  • a user guide
I think about a day each for those (or less, I've already got most of the illustrations). About 2K words for each probably so about 12K in total. Should be able to do it mostly in a week!

Friday, August 04, 2006

Righty ho then...got fed up of arbitrary limits on city sizes due to speed of dump to Maya....so wrote an .obj export. Once the files are in .obj format (and because i do a bunch of optimisations of only outputting each vertex once now, am thinking the jMonkey bit would also benefit a lot from this...) maya can import in seconds and display (lighted in real time) a 400mx400m section of city without any problems...

And a 1Km by 1Km (the obj file alone, with no normals is 30mb...) Adding more detail to these houses suddenly looks like a daunting task, doors and windows would be something like x6 effect on the polycount. Lets put the solution to this down to More's Law...

Have also added a simple load and save facility (that doesnt really work) to allow waterfalls to be written to disk as serialised objects, and read back again. Something is stopping it working and the stack traces are unuseful! Probably best to leave this until after writeup has been submitted - I intend to go on a big bug hun tto make the thing more presentable. I dont pretend to get rid of them all, I dont pretend that I can, but I may be get to the point where it doesn't crash in a 10 minute demo!

One of the main problems in programming speed seems to be familiriarity with the code. I wonder if it should be possible to add automated tests to a program that checks that the programmer understands what they are doing?

Tuesday, August 01, 2006

Wrote a thing that merges the panel of a roof into one, this will let us create walls and overhanging roofes with ease. So far the results arn't perfect, but look promising:




Kinda cool things are: houses share one wall, so houses will have built several walls of their preffered hight around them. The top of the walls can be bevelled, using the skeleton procedure too!

Lol found the bug that was making some of the walls come out upside down: When we traverse the hashset of points when merging the woof panels into a wall, it is critical that the first panel output to sheet builder is a positive one, else theres a chance sheetbuilder will decide up is down. To solve this we just ensure that the first point traversed is on the edge of the shape (corelDraw to come tomrw!

da Jesus of suburbia:

I don't really like the walls, a bit too twee for my liking, perhaps an option to have them in the back gardens, and then ensure the default is to use them sparingly.

Tomorrow is onto the dredded task of making roofs with overhangs and roofs with hatchings. Will probably take rest of week/project!

Thursday, July 27, 2006


(appologies for image size, blogger thinks its acceptable to convert a 60KB gif to a 500KBpng....)
I was wondering where all the heap space was going- above was a kinda cool looking bug. Its what hapen if the street front of a house becomes reall small. Its interesting that as we take the voronoi to the limit, it creates very 'straight skeleton'-like structures for us...


...a bit more work tinkering with internals and I have a system that gives everybody a garden. The very cool thing in this next grab is that most houses are rectangular. I never told it to do this, it seems to be a fairly fundamental geometric thing - if you want a house near a straight street, then the best shape for it is a rectange. Note the neat way the voronoi deals with the corner cases with minimal effort...!


What we have is a parameters for distance from all other houses, another for distance from the street, which is added to (optionally) on one front to create a front of the house.

Am now really confident in the project. I only have a weeks coding left, but feel it now produces results that highlight the effort thats gone into the mathsay bits. I've also done the analysis on my grades from bristol and it looks like that as long as I pass this I'll get the degree I was aiming for. wooo!

Wont be up to much tomorrow or this weekend. The hippyfest that is the cambridge folk festival is in town... (photos here)


Overview of process so far. I gotta go and plan how to create the houses & roofs nicely!:

Monday, July 24, 2006

Right dissapeared at the end of last week due to lack of ait conditioning and an enthusiastic dentist who decided it would be better to remove four teeth than two...

First up concave tesselation. Basically it works!:



Got stuck on some borderline cases tho. Spent a while looking at it....

... then I got fed up with all that I went on a leak hunt. I found a couple of cases where hashtables of geometry (so that when you click on something we can select the correct waterfall) weren't emptied. This ment 100's of megabytes of geometry that wasn't removed from memory. Creating multiple cities would bring my modest machine to its knees. Tis much better this way.
You can get memory leaks in Java!.




For future reference this is the best way i've found to clear up after a JMonkey swing window. Not sure its leak proof, but isn't too bad:

protected void onQuit()
{
renderer.setCamera(null);

ListIterator lit = rootNode.getChildren().listIterator();
while (lit.hasNext()) lit.next(); lit.remove();

rootNode.removeFromParent();

// the might be to blame for inter-display reactions? (also in MagicWindowMonkey)
display.getDisplaySystem().close();
display.getRenderer().clearVBOCache();
display.close();

renderer.clearQueue();
renderer.clearVBOCache();

for (Texture t: textures)TextureManager.releaseTexture(t);
TextureManager.clearCache();

eventDispatch = null;
geometryToWaterfall = null;
geometryToInPlug = null;
geometryToOutPlug = null;
toUpdate = null;
}

Next up was some more bug fixing on the Straight Skeleton:
  • If there are still incompleted parts of the puzzle/points still to be processed - these are disguarded, and the appropriate edges added to the output. We might get these edges on a symetrical shape where one point is left between two edge collided pairs on either side.
  • Secondly the steepness of parallel lines' bisectors examined. I think (this should be proved by someone with better abstract thought than me) that more than two fast bisectors cannot co-exist in one active list (see inset)/


Wednesday, July 19, 2006

First up was a series of test on the concave Voronoi. As you can see it tesselates the enron logo nicely, even with the point on the trunk added last. I expected problems here because it has to trace around the edges to find all the points for the trunk points



Lol, you know when your in trouble when you come to find references for your work and the top google hit is yourself. I think this should be known as the (Ian) Hoyler effect due to the number of his courses where the top hit for a subject is his own website.

Some more testing (I forgot to switch assertions on this morning) and the convex voronoi needed polishing a bit:
Its to do with getting double readings when a bisector enters or leaves a shape due to rounding errors (particularly common in parametric form equations ive noticed....). While the algorithm could be fooled into giving the wrong output, I dont think that case will come up (famous last words I'm sure). "I'm only an undergrad, I'm not paid enough to fix this...."

Monday, July 17, 2006


Here are the diagrams of what was causing a problem on friday with upside down buildings - i'd forgotten that I find the normal of a plane by taking a cross product of its edge-vectors. This only works on a convex polygons without 180 degree (non) bends. I ended up just using trial and error - creating the transform, finding its area and flipping the normal if the area's not positive. I've asked Neill if theres a better way, but I'm fairly any solution would be O(n) in the number of edges, so I cant be far off.

By my contorted time scale I've got 3 weeks left of programming to go (given myself a bit more after last week). I'm a bit dissapointed Ive done so little, but I guess thats how software development goes. I was amazed to find the number of line of code I write each day is only about 500. Feels like a lot more. Lets hope that having my wisdom teeth out on thursday doesn't slow this down any more.



Spent the rest of the afternoon hunting the above borderline bug in the straight skeleton procedure:

Tuesday, July 11, 2006

First up I got the Vornoi running on dots with regular intervals. This was just a case of breaking many borderline conditions. The diagram below gives the most explainable, but there was also much fiddling 'until it worked'. I'm never happy in these situations, you never know when you might hit the exact case that make it fall over!-







I wrote a lot of code to clean up the Voronoi output. Something that finds the size of a polygon/block and if its smaller than some limit merge it with a neighbouring block. Heres an output of the block map (finally some real results) the cool thing is you can just keep hitting a key and it generates another. I'm supprised how good the voronoi it looks without any tinkering, I was expecting to have to do a lot to make streets look like streets etc...
You can see where some blocks have been randomly merged into their neighbours and where some that were too small also got merged, for example the hammer shape in the middle of the above pic. Solid results at last :)

Every five attempts at running it crashes with a mysterious 'zero length edge' message while shrinking the blocks, I'm about to go and look into it....

Monday, July 10, 2006

Here's a post dated blog entry for monday! I got the different block pattern generators working together. So here are some examples of the kind of block patterns we get out:
As you can can see the mixed one looks really authentic! The only problem is my Voronoi tesselator really doesn't like evenly spaced blocks at an angle, I guess thats tomorrows job.

I also fixed up the straight skeleton to create bevelled edges. This will be used to shrink the edges of the blocks away from the road centres to create a road network:


This got me caught up in fixing a lot of the guts of the sity program to create flat panels in the correct locations!

Thursday, June 29, 2006

Today I gave up on the voronoi (just for today tho) and worked on a Opengl/JMonkey graphics display system. The Voronoi was a little to much to face again, and the graphics needed updating because the speed of the maya interface was too slow. You control the camera using the WASD keys, and its all in jME so it should be really easy to turn into a full blown game :) The new window is in the bottom right here, all very nicely lit and everything!


Not much to say, and not much progress, but at least its a post today!

Thursday, June 22, 2006


Here's the first output from the Voronoi/Road network generator. Its been really slow going and i dont know why... The green are the generating dots (random at the moment) and the blue lines currently just keep dividing each time a dot is added. Not a true veronoi yet, but soon!












Heres another, with some funny boundary cases fixed up and much larger. Implementing the Voronoi is much more work that I thought because of details such as boundary cases. Its gonna take up at least all of tomorrow (makeing 3 days total) too.... :(

Friday, June 09, 2006



First an explination of whats what in todays picture - The big squares are the waterfall, the little square on the top is a plug (they all have one these except the root). The little squares on the bottom are sockets (zero to many of these. You can plug multiple plugs into one socket and assign probabilities, eg probability of having a mansard or gabled roof ontop of a particular type of floor layout.

Well, four days in and I've made good progress on the GUI. It feels quite polished now (despite lack of polishing). Today I added the ability to make and break links between components(waterfalls). You can also set the probabilities for each subsequent compent using a nice slider sytem. This updates the colour of the lines to show which of the subsequent components is most likely.

I also had the idea of colouring the plugs to show what could be plugged into what. The idea is that you could have a doorstep profile creator that returns a plug of type line. The door then has a line socket. This means that you cant plug a roof into a door door-step profile(good!). Its quite sucessful, but I'm not sure it will work all the way because the type system is based on hierarchical classes extending one another, so you could put a green plug into a red socket, but not a blue plug into a red socket. I wonder if theres an easy way to show inference through colours

Next step is to create the GUI parameters for each waterfall. Which parameters a waterfall has are coded into it:

public ProbInt VAR_numberSections = new ProbInt(1,Integer.MAX_VALUE, 0, 1);
public String DEF_numberSections = "number of floorspace segments joined together";

public ProbDouble VAR_story = new ProbDouble(0.1,100,0.5,1);
public String DEF_story = "how tall is one story";

Using java's funky reflection i'm gonna extract straight out of the code and create a properties panel for each waterfall without having to code them up in GUI/swing stuff. It'll be neat if it works. As I work on this I also have to figure out a way to save and load the waterfalls so I might do that at the same time.

Wednesday, June 07, 2006


Started off getting JMonkey (3D interface) to work within Javas swing environment. This was a bit of a mess and took a bit of hacking together of the JME and Swing API's. I eventually got it able to open more than one 3d window within one swing application. It was a drag that

They should let the labs get warmer when its hot outside - the air conditioning is freezing in here.

Picture is of hypergraph/'waterfall' system. All done in a 3D engine for opengl niceness of graphics (and dev speed)!

After lunch I made storming progress getting the Maya-like hypergraph up and running. You can select and move components (known as waterfalls). It even draws nice curves between them (but doesn't yet move the curves as you move the waterfalls). The screen shot from today is really pretty.

The idea is to have three windows, one of this waterfall view, one of the predicted output from the currently selected node (eg if your working on a window it shows typical designes that the tree from that point forward would generate) and one with boring load/save etc... buttons. The options for the waterfall will appear in this last window when the waterfall is selected

Tomorrow:
  • Make the curves/links/'flows' visible over the waterfalls
  • Make the curves move with the waterfalls
  • Make it possible to make and break flows in the GUI
  • Add some text to the waterfalls
  • Create the reflection code that will generate the options for each waterfall
  • [if time: create a grouping/boxing mechanism...]
  • Saving and loading a waterfall structure (and all associated options) comes next...

Dunno why blogspot was down all afternoon, but heres the post!