Wednesday, August 27, 2008

as3 geom as class mirror property

Here's a small bit of code I pasted into an as3 geom class to ave the option of inverting the mesh either x,y or z. the uvs work fine

replace function 'v' with:

but first create a mirror var:

public var mirror :String;

private function v(x:Number,y:Number,z:Number):void
{
switch (mirror){
case "x":
verts.push(new Vertex3D(-x,y,z));
break;

case "y":
verts.push(new Vertex3D(x,-y,z));
break;

case "z":
verts.push(new Vertex3D(x,y,-z));
break;

default:
verts.push(new Vertex3D(x,y,z));
break;
}
}


pass the var into the constructor
when you initiate your object
either "x","y","z"

public function coccyx( material:MaterialObject3D=null,mirror:String="", initObject:Object=null )
{
//--\\
//---\\
//---//
this.mirror = mirror


even better would be code for a combination of all three

download th as3 geom class exporter here

Monday, August 25, 2008

papervision 3d

Have loaded a complex model using the as3 geom exporter, which compiles the model information on export, embedding it with the flash swf, avoids parsing the file later on like collada.
Also coded 3d camera movement around the object. I had the object rotating, but want later on to rotate the parts of the object separately. Had trouble finding examples of even camera movement around the object.
It might take a moment to load, will build that in later

Here is the example with markers to show your how the sin() works
also learnt how to UVW unwrap on the way, this example is a box unwrap, hence the shadows. There are not lights in this scene so it needs baked on lights to show the form.
here is the code for the camera movement

sh = stage.stageWidth;
Pi = Math.PI/180;
mY = ((mouseY/sh)*180) * Pi;
mX = ((mouseX/(sh/2))*180) * Pi;
radY1 =mY+1.8;
radY2 =mY+3.2;
radX1 =mX+1.8;
radZ =mX+3.3;


closY1 = 100*Math.sin(radY1);
closY2 = 100*Math.sin(radY2);
closX1 = 100*Math.sin(radX1);
closZ = 100*Math.sin(radZ);

camX = (1*(closX1 * ((-closY2)/100)));
camZ = closZ* ((-closY2)/100);
///


default_camera.x=camX;
default_camera.y=closY1;
default_camera.z=camZ

default_camera.lookAt (objectArray[0]);

Tuesday, July 8, 2008

New project

Having completed my first DIL goal in PHP, I've decided to tackle the apparently more visually rewarding job of exporting a simple polygon model from 3dsMax with Collada or some other conversion plugin which will be read by Papervision 2.0. Import it into a papervision class file, the skeleton for which can be seen <here>, with imported plane with transparent PNG texture.
Then export this with a pre-loader if neccessary for access from BlackBoard.
After I've done that I'll attempt to make the model interactive, so you can click on parts and change there orientation, or pull up information pertaining to them.
Ultimately, if funding becomes available, the scanning of anatomical models kept for the purposes of hands on teaching would enable students to explore objects in cyberspace. The 3d laser scanner here is designed just for that purpose.
The raw mesh will have to be optimized and mapped, even if just baked with a light map for shading, but with the potential for interactive maps - flash movies/animations as textures.
here's a link to some examples(on the right)

Monday, June 16, 2008

swf Projectors transparency capabilities

In the effort to customize my windows XP workstation I have discovered that flash projector applications proclaiming to allow transparent, shaped, applications, are not all they're cracked up to be.
MDM zinc 2.5 loads a transparent flash 8 swf projector after about 5 mintues, and is so slow that proves impossible to use. Flash 9 it won't take at all.
Northcodes swfStudio 3.5 will work but is sticky.
Old flash Ants IceProjector 1.5 flows like sugar compared to these, and supports AS3. Unfortunatley these programms application/system manipulating capabilities run inverse to there graphical prowess. Iceprojector is limited to fsCommands.
Cacheing the moving images as bitmaps seems to have no effect.
Perhaps there is a workaround or MDM 3 is better.

go here to have a look at comparisons
and here for the flash mag review

MDM said...

You should REALLY use MDM Zinc 3.0 - the transparency is flawless, optimized and works perfectly across Windows and Mac OSX now. The transparency in 2.5 is ancient and not worth mentioning. Definately give Zinc 3.0 a go. :)

Too right MDM, version 3 is very nice and smooth, too bad about the watermark;>

Friday, June 13, 2008

Goop

Have been trying to recreate the behaviour of macromolecules, polymers, long chain molecules, which have a kinetic bond. As computers become more ergonomic it seems only natural that they'll appear more organic. Although they have goopyness in the 60s.
LINK

Tuesday, June 10, 2008

Gardening Layout

When I layout my garden, it will be designed like a strip tease, with parts revealed, at certain points, and then concealed, perhaps behind viels, or sunk in shadow. So the viewer will be led on by the mystery of the next bend.
Although it is hard to imagine a garden not only as a 3dimensional space, but also as a temporal, chronological space, like a piece of music. With juxtapositions, and contrast both imediately, and over time.
Bethunes Gulley of Dunedin, is a myterious place, it is huge, and looks as though it may have been part of an ancient, giant long dead civilisation.

here is a map drawn from my minds eye. Of course from here it looks more like an intestine.


when you come out of the tunnel you can see right up the gully.
Once you've crossed the first green you are funnelled towards the foot bridge. Here the bush enclosers the vista, but through it you can make out the terraces beyond.
You cross the bridge and burst out into the second green, and make your way to the top of the steps under the forboding watch of the pines, this is the entry to the Mount Cargill walk.

DIL solution for online courses

Wouldn't it be good if the teachers of an online course had access to a shared file, a central depository that could be added to and subtracted from by all those involved?
At Polytech, there is already such a system in place. What, for an online course would be useful is if those resources could be accessed from the internet by students. If the folder index, which would be readily transposable to blackboard or any html supporting page could provide access to html hyperlinked text, and embedded media such as progressive download video(better for slow connections) and audio, interactive flash files(*.SWFs), and of course images, the teachers and students could be instantly incontact through rich media without the need of a middle man to manage the preparation of files for the web.
But teachers can't waste their time optimizing video and audio so it will be accessible to the slowest backwater dial up trickle, that is why Utube and blip etc are so good.
But what a rigmarole it is just to get videos up and running on those web services.
With a shared folder the process would be instant, and with the right software autimated optimzing can be achieved reliably and with almost any format you can lay your hands on.
So now all your resources are in a standadised format that is accesible for the students through the html pages in which they're embedded.
The html pages can be composed as easily as you would a word file, "inserting" images etc. Inserting links allows you to jump around the resource, to develop multiple depths, digressions, curios, for the avid students, to jump to a glossary etc.

What would be on the web would be what is visible in your shared folder.
Version control would allow teachers to edit a file simultaneously, creating two versions, which could be concatenated as required. Editing a file would create a copy, with each amendations date and amendor visible. Control of what was accessible by students would be in your hands.

I wonder if teachers had a way to compile their text, and all their media in readiness for the web without having to upload files to blackboard or any other web service, infact, to not have to use the web at all inorder to make it accessible for the web,
if a shared hub for all course developement could be made to work?

Thursday, June 5, 2008

PHP

Have managed to save vars from a flash file to a text file.
GO HERE
Enter your name and a message and click POST.
It will be sent to a PHP file which will take the variables and save them to a text file.
You can look at the text file to see who else has visited

Wednesday, May 28, 2008

DIL

Here is some evidence of my efforts with PHP.
The proof is that every time you visit the site you add another line to the text file (which is linked). the code runs when you load the page.
Now I can see How many people are really interested in PHP
LINK

Plan For DIL project

My new Plan for DIL is to set up server side support for a flash application.
This means that a user can log in, like I have to this blog, enter information, and upload files.
This sounds simple but so far Ive had trouble.
I think DIL would be a good forum if we could find an expert.
Ideally this would be done on a Polytech server, so students could have reliable secure access
It's a lot less exciting than 3d, but more pressing at the moment
The application I'm working on will allow students to carray out an online test, print there results, and send them to the teacher for assessment. Or first to a collater, which will pass the information on in digestable chunks

here is a link to the application I'm developing for construction - you might have to wait a few moments.
go HERE
I'm currently developing my garden into a feast of native plants, shrubs and trees. At the top, where it is protected from all sides and the sun beats against the clay I'll have alpine plants, and succulents.
At the moment, I'm collecting as many miniature plants as I can, starting with succulents, because they are the only things which have sofar taken route from my cuttings. Whipcord hebes,


hebe salicornioides



helichrysum coralloides

, I expected to be easy because of the softness of their wood, and their proliferation. However, although these have all started to go black, the ones in sand have taken the longest. Although I was avoiding dampness around their heels for fear of rot, next time I shall keep a basin of water under them, out of contact with the sand, but close enough that evaporation will keep them moist and cool on hot days. I experimented also with sitting some in clear resealable plastic bags, with there tops open. The humidity hasn't done them any favours.
. The seeds I collected I sowed in April. With no results so far. Seeds included libertia oxioides (New Zeland Iris), some of which I soaked in boiling water until it cooled, and planted at a range of depths between the 2 mm and a surface sprinkling. This variation I treated all the seeds to. I also planted the fruits, mistakenly I realise, of a three kings Island Cabbage tree (CordyLine Kaspar, or Cordyline obtecta).
Cabbage trees fruits according to Plant Grow
Plant Grow
, you should Soak, Friction, Sieve Dry.
TheTotara berries I picked have a remained gelatinous after 2 months in the hot water cubbord in a brown paper bag, but they are recalcitrant, and they need to retain their flesh to avoid dessication.
They also need to be stimulated by cool weather, and are best sown in the spring, so it will be the fridge for them before long. Along with Pittosporum, Hebe and CordyLine Australis species.
more about germination
The succulents and other miniatures I will have I plan to set in a matrix of red brick hexagons, filled with suitable well draining soil, and covered with quarry dust for weed control, and colour, struck in concrete, and following the curvature of the hill. So they will act as cells, or pots, for the different specimens. Further down the hill will have tussocks, grassess and hebes (hebe topiary) and iris. I would also like cyprus pillars, but the have proven hard to make cuttings of, and they grow slowly. Poplars would serve just as nicely I think, because I have seen some as street trees in Dunedin and even in miniature they were pillar shaped. This is where the garden will take a cue from the spaciousness and order of Versailles, although not quite as spacious



versailles

I have a Festuca Coxxi, growing poorly in the lee of a lacebark, which I can separate hopefully, and, along with some carex plant out on the slope.
This is a very steep, terraced section, and below the house, away from the current social spread as it were, I plan to plant out in an arboratum, that can be wandered through, I kind of Alice in wonderland of scales and strange forms.
I just saw a large planting of Carmichaelia Odorata (a leafy broom) with very little between its long thin trunks, but a light canopy just overhead. In between, were planted Chattam Island forget me nots. These large formations that can be wandered through or around (I'll also have veriagated pittosporum,




and Phormiums(flax)), will be placed on the landscape in such a way that each position has its own vista, but also with concealed areas to discover. I will also have a small planting of Manuka, which I think would do better than most in the clayey soil. The paths will be defined more by the spaces between the plantings and the shape of the land than any change in material. Use of plastic sheeting and bark should keep the areas between plantings clear to a degree.

Further down towards the bottom of the garden (my property is in the shape of a wedge, with its point in the river at the bottom of a gulley) it gets damper and darker. Here I already have PoroPoro, and intend to add fuschia, a Monstera, is actually doing well higher up in the garden. But because of its shape, the jagged saw tooth leaves, it's waxy tropicle surface of it's leaves and its name which can turn into Staremonsta if your not careful, I want to plant it with the jungly plants. Another thing, with dark purple/red berries, dangling like a string of bells, and I have not found the name for, but is probably a weed, looks very mysterious and also belongs down there.
My neighbour has a Nikau, whose berries all disapared in a matter of weeks without a trace, but I intend to catch them next year, and plant them somewhere down there too.

Tuesday, May 27, 2008

The Yes Tree

I have a plan for modelling anything, using flash, it's called the Yes tree.
It would work like a flow chart.
For instance, a programme for generating the forms of shrubs.
The various layers of the tree follow its function, sub catorgarising as it goes.

The top layer might be:

architectural function: decorative /shelter /anti erosion

or:

Environment: temperate / desert / mountain

From each of these options follows the next set of functions

root structure: fine/ course

this function might be further devisible: prolific / sparse


Look in a dictionary, or crate your own definition of a shrub. Say it must have the following:
It must have roots to suck up nutrients, it must have some kind of structure to provide support for photosynthesizing surfaces. It must have photosynthesizing surfaces. This is the Yes tree, it is interesting when every possible path is taken, and the end for each path reached. Each level of functionality may be broken down horizontally and vertically, or descriptively and categorically.

If you start with a block of stone, and some parts are harder than others, at the bottom of the tree is a form. The decisions are shaping.

The granularity of the tree, or the resolution can be refined. Every leaf must have a surface. every surface must have a colour, every surface must have a texture.
Every leaf must have a cappilary system. This system could be analogous to the root system.
The root system paths, or list of categories and descriptions, could then be modular. Employed wherever an analogous form needs describing.
So to with the surface set.
Each form then has a key, or a gene, which describes them and their form.

The next genration Yes tree would have described functions aswell. So a person must travel, but does he walk or run or fly or bike?
Obviously this Yes tree must be goal oriented then, as the objects neccessary functions must be defined by their environment.
What is this environment? It is the very Yes tree itself. To be expereince by the user.
If it were to be a self generating program, it would start with two poles, two extremes, or apexes that once reached would move in a continous cycle.
In this environment, the immediate sarroundings would differentiate at the immediate level. The user would be taken through the cycles of one level of description, move onto the next set of descriptions, under the next description a level up, and so be made familiar the with all the manifestations. A year in this environment might be one cycle. It would be like a world trip. Perhaps starting in Scandanavia, Iceland, Norway Denmark, Germany, SwitzerLand, Austria, Italy (or Spain), Greece, Turkey (Or Moroco?),
By the time you get to Japan, you've had you fill of spices and are ready for something light.

A dictionary Yes tree would be very large. You might start with nouns.
But to make a Yes Tree self generate, you would have to start the objects with a very basic function. That is to create. To make patterns. So, if each object was a seed, with only the ability to see, memorize, recognize, and combine patterns that were presented to it. And those patterns that were represented to it were only those that it had seen, memorized, or combined, over time, that seed would grow its own world.
As these patterns became more complex, so the world would mirror its mind. Resolution of patterns would gradually become less. The object would move from recognising molecular structures and patterns, to recognising objects. Eventually, worlds could become words, as words become worlds.
A successful object would be one that saw patterns, and used them to create more.
If an imbalance appeared in the development of the world tree, the computer could remedy any trends by displaying examples of complimentary of conflicting patterns.
How could this be represented visually, and in what dimensions? - whatch this space!

Tuesday, May 20, 2008

Digital Information Literacy

Saras use of Animoto turned her sons 18th birthday into a real event on the internet.
The fast cutting and music made a series of stills into an exciting experience.
Animoto seems ideal for quickly creating creating an impression of an event.
The fact that it's a Flash video, and not a vector animation, which is what flash was designed for, is surprising, as it would probably take less time to download, and be higher quality.

Digital Information Literacy

The first session was interesting to see the developments in digital networking the extent and path it may take.
As a programmer and game player I'm interested in vitual worlds, particularly those self propagating organisms like facebook and flicker, that are really just substrates for the growth of a culture. These frameworks which can act as a mirror to the users personal preferences, that can channel, nurture, what exists already, pump blood to those muscles which most need it, and let those unnessercesary or unwanted aspects fall by the wayside, to clear the way. Component based programming, or customisable applications, and networks may oneday act in the manner of a muscle which needs custant use and throughput to flourish. Data sharing programmes such as bittorrent, which utilises users computers like cells, or worker bees, each contributing a tiny amount to the sharing of a file, can make that file accessible to anyone, and as the owners of that file grow, so does the files accessibility.
These sorts of customisable, biologically intelligent, or self developing applications is what I'm interested in. Accessible 3d graphics is going to play a part in their realisation, and that's what I'm going to attemp to create in DIL.
A model of an object that may be difficult to conceptualize without the aid of 3d space, that can be rotated, and perhaps manipulated in other ways, such as exlpoded, to be made readily available for a student to use on blackboard.

here are some links to papervision examples
tree
park seasons
extrude pixel

nissan game


this is a papervision show reel