Planning the Spontaneous

It's more than just a blueprint.

Catchup: confused = (learningCurve > n^2) ? indefinately : possibly;

Posted by Robert Chow on 01/10/2009

I’ve been here for a few weeks, and I’ve already learnt a lot more than I have over the past few years. And I also know that what I’ve learnt is, and will be, useful for the future as well. It’s kinda scary really. The amount of knowledge that goes on around this building, although there are only around 15 personnel, is vast. Not to mention the level that my supervisor is at. Of course you don’t know yet do you? He came to the company as a PhD graduate, and is basically creating a revolution within the comany, despite having only been here for a year and a half now. He’s the reason I’m creating the new visuals for the new program, instead of maintaining the old one.  Good job really, I’m not the kind of person to be trawling through code looking for bugs – that’s someone elses job.   So the old program’s written in C++, and was essentially spaghetti code.  Unmaintainable and unscalable.  So my supervisor has proposed to build a new program based on his research – component based systems.  It’s like lego – you’ve got bricks that make parts and they all plug into one another – and because of this, you can easily change each part.  Well, alright, it’s not that simple, but it’s the most well-known analogy anyway.  Especially around here.  My point is, the amount of experience everyone here has; well, you can definately tell they’ve got it.  And it’s pretty scary.  Least I’m getting taught properly this year.  I hope.

Kanban Board

Kanban BoardKanban Board. Each post-stick note represents a process, and belongs to any of the 5 swim lanes.  These are Design, Implement and Review, with queue lanes to represent the finish of one section before proceeding onto the next.  The swim lanes should have limits to how many processes can appear in any one swim lane at a time.

We’ve just adopted a new way of time-management – my supervisor’s been a one-man team until I came along, so he figured we should probably get organised. So we’re using this thing called a Kanban board. Essentially you have swim lanes on the board, and you have to make your way across from the start to the finish.  Each thing on the board is a process – what you’re working on. Or should be working on. We’re still trying to get used to it – each process should only really be on the board a week or so at a time.  They’re ending up at about a month or so at a time. So that still needs to be refined. In addition to the board, we have a review of the board twice a week, in the form of stand-up meetings, which should only last around 5 minutes.  I think we’re still getting used to those too – we end up sitting down after a while and they inevitably last a lot longer than the intended 5.

At this point, I’ve managed to get the hang of VBOs, and drawn some pretty and interactive bar charts. It’s all done well if it’s hard-coded. But that’s the problem really. The abstraction’s a lot more difficult than it seems. Least I think so anyway. I guess those design patterns are coming handy at this point. Remember my retained mode rendering? Turns out I was missing something quite important – indices. Using indices allow you to specify which vertices get drawn in what order, so you don’t have to specify the same vertices more than once. Makes sense really. It’s a shame I dived in too quickly and became ignorant. They say ignorance is bliss. I disagree.

Vertex Buffer Objects: Revised

So similarly to before, we have to generate the buffers and bind the buffers appropriately. However, instead of draw the arrays, we draw the elements, defined in the element array buffer – indicated by the indices.

Gl.glBindBuffer(Gl.GL_ELEMENT_ARRAY_BUFFER, buffers[0]);
Gl.glBufferData(Gl.GL_ELEMENT_ARRAY_BUFFER, (IntPtr)(indices.Length * sizeof(float)), indices, Gl.GL_STATIC_DRAW);
Gl.glDrawElements(drawtype, count, Gl.GL_UNSIGNED_INT, (IntPtr)(offset * sizeof(uint)));

Another thing you may have noticed is that I’ve added an offset for the pointer – this allows you to draw many different shapes with the same data in the graphics card without changing it – you just need to change the data it’s pointing to.

So by now, I’ve done a lot of prototyping.  In order for me to create the Grapher and Mapper components, I need to create the Renderer component for them to interact with.  I was a bit gutted thinking that I’d got VBOs pretty much sorted, to find I had to a lot more research to get this working. Saying that, I still need to apply textures to VBOs.  But I’m quite pleased with my progress as far as Renderer is concerned – I’ve prototyped the majority of VBOs, and how they will fit into a scenegraph. In addition to Renderer being a Tao wrapper, I’m also hoping to include layers – a bit like Adobe Photoshop.   It sounds easy enough – and it is.  When it’s hard-coded. It’s a little bit different when you’re working with shapes of any size, fitting into containers, which themselves have to be encapsulated into a layer.  And then there’s multiple layering to consider too.

Graph PrototypeGraph Prototype.  These are screen shots of a prototype I did just a couple of weeks into the placement.  It shows how layering can be considered in a graph.  All of the graph elements are hard-coded, but it does allow for interaction.  The layers can be ordered, and their visibility switched on/off – this will, in effect, produce a different view of the graph.  Sorry about the colours – that was my boss’ fault – he doesn’t like dark backgrounds.

As far as Grapher is concerned, it’s going rather well actually.  The research is morealess done – mainly because I was forced to do it.  On the first day, my supervisor informed me that I would be making a 45 minute deliverable in front of around 20 people, about graphs.  I was not a happy bunny to say the least.  But it went rather well actually.   And if I’m honest, having gone from doing 5 minute presentations at uni to doing a large one professionally, I quite enjoyed the challenge really. True, I was shaking like a leaf, but I felt pretty good coming out of it. Hopefully, I’ll still be here for the next one.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: