03-20-2009 07:34 AM - edited 03-20-2009 07:37 AM
There had been an coding challenge in Germany some month back in c't (THE german computer mag 😉 )
A server was running modified MAME with the org. ASTEROIDS game and send out the vektorgraphic memory.
Task was to write an application that plays ASTEROIDS by interpreting the vektorscreen memory and controlling the buttons via UDP packets.
http://www.heise.de/ct/projekte/machmit/asteroids/
Main idea: Run a game in one task (or own server) and create a LabVIEW program to play (win) the game.
Another idea is to write the most amazing more or less scientific application to teach children physics/math/tech in LabVIEW that don't need (to much) additional hardware (only Soundcard,headphone, speaker, keyboard ... allow only 10$ ?? additional hardware) and let the forum vote. (maybe only proven members to minimize manipulations) extra categories for best graphic, best idea, cleanest implementation
04-29-2009 08:03 AM
OK Thread has gone dead.
Let's try another idea.
What if I offered a CASH PRIZE for the Challenge Winner ?
Of course I would have to get something useful out of it that I could use. WHat I have ben playing with lately is a way to do.... 3d binning. What I mean by this is I want to go beyond just displaying slices piled up on top of each other like these images illustrate
THe top image shows pink/red regions where a bubble is found in a fluid flow. So I'd like to pull out just that bubble and render it as a surface. I'd like to extend that code so I can use it on other data sets
like the one shown in this gif.
SO I could render the brain or skull as sererate surfaces.
Similarly I could use it to render fluid flows in 3-space.
But this challenge is just to big for me to handle while sitting on the front porch trying to figure it out. THere are a lot of mini-challenges that go into this.
THe final output I need is (4) 2d array that contains
X-Array - X coordinates of surface
.
.
Z-Array - value at that location.
and the arrays should be arranged such that adjacent values can be connected with a surface.
Your thoughts!
Ben
04-29-2009 08:53 AM
Ben,
Quite an interesting challenge there
I have an academic history in Thermodynamics, especially multi-phase CFD (Computational Fluid Dynamics) which manages the challenge of representing fluids in a computational domain. Typically, surfaces are represented by two large arrays - one storing three-dimensional coordinates of hard points (vertices) and another describing the connectivity (edges and facets). These facets can be drawn up in rendering packages as individual triangles, which meet edge to edge to create impressions of three-dimensional surfaces. Such an approach could be precisely what you need here, but I've never attempted anything of the sort in LabVIEW before (the multi-threading capabilities lend themselves very well to such an idea though...).
I'm not sure I understand the last part of your request - the what I need bit (4x2D arrays?). Could you be a little more descriptive on that?
Plus, what magnitude of financial incentive are you offering? This could be a very interesting challenge, but I suspect an accurate solid interpreter and modelling routine set could be a lot of work.
04-29-2009 08:56 AM
I think maybe we have mor chances if we keep the scope of the challenges a bit narrower and less complicated......
The last "official" NI Challenge was, for my taste, too complicated.
Things like the bit twiddler or median machine are simple to understand but hard to master. I think it'd be easier to mobilise the masses if the challenge is a simple (yet complex) task.
My vote is still for the travelling salesman algorithm.
Shane.
04-29-2009 11:44 AM
Ben wrote:So I could render the brain or skull as sererate surfaces.
Ben, I don't quite understand the output you want. Are you looking for a "marching cubes" algorithm or similar?
04-29-2009 12:16 PM
Hi Christian, thoric et al,
THe "output" I am looking for is what I need to pass to the CW 3-d graph to plot the surface. THe marching cubes may be what is used internal to the 3d-graph.
The simpleset example I can cite off hand is the 3-d car I posted in this thread.
That examples uses four 2d arrays to describe the location in space where a point should be plotted along with the color.
The four 2d arrays used by the 3d graph when plotting a parametric surface are used together and represent a surface in 3-space. As I understand the 3d graph it starts with the value at index (0,0) of each of the arrays and plots a point where X(0,0) Y(0,0) Z(0,0) indicates with a color as defined by W(0,0).
It will draw a surface connecting the points defined vlaues at indexes
(0,0)
(0,1)
(1,0)
(1,1)
For more than four points it proceed in a similar manner rendering surfaces between the points.
So if you play with that "Car" example pointed to by my above link, you will see that I just tweaked numbers to get the surface to look like a car.
What I would like to develope an algorithm to do is to pick out all of those points (from the 3-d array I get from the animated gif) and produce a set of data I can pass to the 3d graph so that it just draws the brain.
Am I getting closer to being understood?
As far as how much I would offer?
I'll have to work it out with my wife but I'd at least like to buy the winner a case of beer so they can celebrate crushing the competition.
Still just trying to get some healthy competition going that will let us all learn as we go.
Ben
04-29-2009 04:36 PM
Hi Ben,
I have sort of done similar things with 3D in the past for manipulating data that was plotted on a 3D surface whereby I characterised several "Parameters" over two dimensions (Thus producing 3D or a surface plot for each parameter). These parameters were then manipulated in what I liked to call 4D whereby we could tweak the surface to some degree by applying some math to the "Parameter"
Unfortunately being a contractor I no longer work at that company. So, you geussed it I no longer have the code.
However i do remember The "griddata" matLab function was particularly usefull (Which can be used in Mathscript along with some others). Looking at the LV Behind Mathscript help me get my head round some of the data manipulations.
I will try to have a play around and see if i can re-learn some of the techniques i used as it sounds similar to your problem 🙂
Craig
Beer is always a nice incentive to me. That and decent paragliding weather 😄
04-29-2009 05:21 PM
Hi Ben,
From what I can see, these CWGraph3D limits surface plots to only those that can be described by a tranformed orthogonal mesh of quadrilaterals. It would be difficult to generate such a mesh to suit a surface from a 3-D scalar field (such as in the animated gif above).
It might be easier to use the method of cubic marching described by altenbach to produce a computational domain of tetrhedra, and display these in the 3D Picture Control. Wrapping a user-defined texture onto the surface could then (possibly) be used to simulate a colour map as you achieved in your wind-tunnel car thread.
I might give this a go out of curiosity, if I get an evening off in the next few days, just to see
04-29-2009 05:40 PM - edited 04-29-2009 05:50 PM
Hmmm after more thought it really is quite tricky. To Plot "Just the bubble" in 3D space i suppose you would first need to filter the data on the colour "say W" and then only draw those values. I remember now i used griddata to interpolate to a higher reolution and make my data evenly spaced across the x-y axis (For computing in Integers). Maybey something like this??
gridata all 2d Slices to higher res
Isolate each bubble into its own data set.Fill bubble in with some polygon filling function maybey something like this http://tetgen.berlios.de/
re plot onto single 3D graph.
Seems like could be verging on vectors.
Way outta my depth now so am going to watch and learn :).
After i have watched the snooker on iPlayer
Craig
04-30-2009 06:05 AM
craigc wrote:Hmmm after more thought it really is quite tricky. To Plot "Just the bubble" in 3D space i suppose you would first need to filter the data on the colour "say W" and then only draw those values. ...
Craig
Message Edited by craigc on 04-29-2009 05:50 PM
That is why I was thinking 3d binning because the W values that define the buble are not all the same value and the location in space determines if they are associated with each other so I can seperate the individual bubles from each other.
If applied to CFD we could image flow regions of different flow with speperate surafces that we could hide/show to see things better.
Applied to the brain we pull out tissue type.
I imagine most of us when watching the gif are constructing such images mentally.
I would like to figure out how to do this computationally.
Could this be broken down intoa series of challenges? .....
Remeber this thread is about Challenges so we don't have to get stuck on this one.... UNLESS...
Could this be meat for a team Challenge ?
Please share your thoughts,
Ben