Monday, 24 November 2008

A Look @ Agile Software Development

Having been prompted by my tutor, I decided to take a look at Agile Software Development today and find out what it's all about.



Here are the some of the underlying principles i extracted from my research:-
  • Changes in requirements are accepted as inevitable.
  • KISS (Keep it simple, stupid!). Don't do more work than is required.
  • Code should be of High-quality and clear of it's intention. Techniques such as design patterns and refactoring are embraced.
  • Systems are built incrementally, each piece at a time with frequent builds encouraged.
  • Focuses on the strong value of team-work rather than the use of excessive or expensive tools to improve productivity. Believes that face-to-face conversation with team members is always the best method of communication.
  • It's all about the software. Documentation can be neccessary but takes a back seat to the primary goal of creating high-quality software. Unless documentation is absolutely required, it is avoided.
  • Constant communication between the developer and customer is vital so that "inevitable" changes can be relayed effectively.

The term Agile development encompasses many recently developed methodologies such as XP, SCRUM and Test-driven Development. Work is generally done iteratively in small independant teams that make a piece of software every couple of weeks. Each iteration will contain phases similar to those in the Waterfall Method, such as Planning, Requirements Analysis, Design, Implementation, Testing and Evaluation.

It was useful last year that we touched on Design Patterns and UML diagrams in the 'Rendering' module. This helped to understand the purpose of Agile development and the issues with implementing maintainable and flexible code for large systems.

We also touched on Refactoring last year in the GS2 module, which basically encompasses the restructuring of code so that is it more usable, understandable, reliable, flexible or maintainable, WITHOUT actaully changing what the code does. Again, this helped to understand the motivation for the principles in Agile development.

--------------------------------------------------

Essentially, Agile development seems to be about simplicity. It's like a 'stripped-down' appraoch to software development. In many ways, it seems to be about finding the most effective and least painful way of arriving at the end goal - software that works. It focuses on what matters and devotes time to what is most important, whilst ignoring the laborious processes that do little to actually progress the project.

Equally it promotes focusing on the problems of 'the now' and tackling potential problems when they arrise.

Seems perfect for the stereotypically lazy student!

-----------------------------------------

I think some of the principles of Agile development create a good mindset to approach implementing the application with. However, it's views on documentation mean i cannot wholely take on the Agile mindset, since 70% of the project marks are awarded for the report, making the documentation of higher priority than the application! Additionally, some of the principles seem only applicable to team-work, whereas i am undertaking this project alone.

I am also reluctant to take the iterative approach that is described in many Agile practices. Again this is designed for teams but the main worry is that i would not have enough time to complete more than one iteration in the allotted time for the project.

What was interesting was thinking about the way Agile development accepts changes as inevitable and the realisation that the requirements within my project could change as i begin to understand more about the subject area. Perhaps the adoption of Agile methods during my implementation could ensure the impact of these potential changes are kept to a minumum?


Sources :

Monday, 17 November 2008

Max Garber's Cloth Simulation App

Hi all,
Research is officially under-way! So first-up, i found this peice of work:-


This is a really cool application; it allows the user to fire cannon balls at two pieces of cloth, and the cloth simulation and collision response seem very good. The dude who created this piece referenced an article - Advanced Character Physics by Thomas Jakobsen - as what he based it on. So i thought what better place to start than this:

'Advanced Character Physics', by Thomas Jakobsen


What I Learned From This Article

This article introduced me to a wide range of different topics concerned with real-time simulation.


The first interesting thing it mentions about simulation for
real-time use is accuracy is not the major concern - it is more about believability, speed of execution and stability. Ultimately, for real-time use, if the programmer can cobble together a fast and stable solution that still looks believable to a degree, this is more valuable than an immensely accurate simulation.

Verlet Integration
Verlet integration works by storing a particles position and last position. The concept of velocity is not really taken into account, although it is implicity defined for the last frame by (position - old position). Not explicitly defining a velocity for a particle means, you can 'pick-up' particles and place them somewhere, in an instant; their velocity is implicitly defined as a result of their movement and the simulation continues smoothly - this makes it very useful for collision handling.

Constraints

Particle positions can be constrained by '
springs'. A weak spring will gradually satisfy a constraint and a stiff spring will rapidly satisfy a constraint. An infinitely stiff spring can instantly satisfy a constraint (put a particle straight back where it should be).

An Iterative Approach to Satisfying Multiple Constraints

Satisfying multiple
constraints can be a problem because satisfying one constraint can invalidate another. The article mentions a method whereby each constraint is satisfied individually, and this process is repeated a number of times per frame. This winds up giving a result that converges to satisfy all constrains simultaneously (Apparently! I can foresee situations where the constraints are continually invalidating each other?). Supposedly, more times you repeat, the better the result converges so the method becomes flexible in terms of simulation accuracy, which is very useful for optimisation. Additionally, the articles states that Verlet Integration maintains the simulations stability independently of how accurate the results are.

Approximating Square-Roots

When satisfying a constraint such as the distance between two particles, a square-root calculation must be done per frame to know the current distance between them. Put simply, square-roots are slow and expensive. So a good
optimization is to approximate the result. A method to do this is touched on in the article called 1st order Taylor-expansion. This needs further reading to understand its implemtation.

How can this be applied to my project?

Cloth could be a grid of vertices, each represented by point-particles with
constraints between adjacent particles modelled by springs. Constraints are solved iteratively therefore giving a simulation with flexible accuracy, optimisable for real-time.


What didn't i understand in this article / what else needs to be researched?

  • Numerical integration - the article mentions other types, which would be worth looking into. Also i'd like to better understand the issues related with stability (what exactly makes a method stable or unstable? and why do the stability issues arrise?).
  • The article mentions optimisation through use of an array of floats instead of a Vector3 representation - how does this work?
  • Approximating square-roots. 1st order Taylor-Expansion - how does this work and how can it be implemented?
  • Relaxation / Jacobi or Gauss-Seidel iteration - learn more about this iterative constraint handling and how it converges the results to satisfy multiple constraints.

Thoughts on Research

Research Purpose
What is the purpose of my research?
  • To get the knowledge and skills to actually create what i plan to create.
  • To be able to write an informed requirements analysis for the application.
  • To be able to document the learning process in the project write-up.

See What's Out There
For my initial research i am simply going to see what's already been done in the field. The goal being a good understanding of the fundamentals (if they exist!) in simulating cloth, and a good overall feel for what's possible, what's been tried, what works, what doesn't ect!

Branching
I plan to approach the research by branching off if needed. So when i'm researching and i come accross a concept i'm not familiar with, i will branch away to discover what it is, make a note of the article i was reading previously and come back to it later. I realise this could mean branching around on a wild goose-chase, particularly in the beginning, even perhaps into topics that aren't relevant. However, i think it is a good approach as long as i keep record of previous material i didn't finish reading and i ensure what i'm researching doesn't get completely off-topic. Common sense will decide when to branch and when not to.

Specific Features
After a good grounding in the concepts involved, i'm then gonna start researching about the specific features i want the Cloth to show - real-time, interaction, collision ect.

----------------

So that i can document the learning process in the write-up, i will show and organise my findings here, on this blog.

Tim.

Monday, 10 November 2008

The first of many...

Hi all,

Welcome to my Final Year Project blog. This is gonna' be a collection of ideas and thought processes associated with the Final Year Project module, and also just general updates outlining where i'm at in the project.

So, with the specification submitted i have finally decided what my project is going to be:-


Cloth simulation showing the following features:-
  • It is real-time.
  • It exists within a three-dimensional environment.
  • The cloth moves and deforms realistically in accordance with its environment.
  • The simulation is interactive through allowing the application user to move and deform the piece of cloth.
  • The piece of cloth can collide with simplistic primitives, such as a sphere or cuboid, in a realistic fashion.
  • The piece of cloth is fixable at points in the 3D environment.

An application showing an implementation of cloth with these features will be implemented. Along with a 10,000 word report that discusses the research process, learning outcomes, decisions made, and then documents the testing of the application and wraps up with an evaluation of the project.

With the specification i gave a rough project schedule as:-
  • Nov – Research relevant subject matter and gain knowledge needed.
  • Dec – Analysis of requirements upon reflection of research. Application design.
  • Jan – Start application construction / implementation.
  • Feb – Complete application. Testing of application. Begin write-up.
  • March – Finish write-up.

By December i'd like to be in a position of thorough understanding in the cloth simulation techniques out there, be deciding what the most suitable method(s)/technique(s) for me to use are, and then start thinking about how i might actually implement the application.

First things first though : Research!

Onwards and upwards.

Tim.