Jump to content

1st LAVA Coding Challenge


Recommended Posts

Coding Challenge

Ok, LAVA Members :) You think you've got what it takes? Do you want to own a very desirable Grey LAVA T-shirt and White Mug?

post-2-1126503852.jpg?width=400

post-2-1126503840.jpg?width=400

post-2-1126503389.jpg?width=400

All you need to do is participate and win our first official LAVA coding challenge.

Challenge Description:

Model the ripple effects of moving a mouse over a liquid.

Download the following AVI movie to view an example of the challenge.

Download File:post-2-1126486112.zip

The minimum requirement is that your mouse disturbs the background image when hovered over it. The disturbance must be as close as possible to that of a liquid (ripples). The size of the image must be 500px wide by 200px height. You may use IMAQ tools and viewers, however the goal is to accomplish this challenge using the default picture control that comes with LabVIEW. If you know of a better native way to do this in LabVIEW, go right a head.

For bonus points you can implement the following features:

  1. Ability to load any user defined image (jpg or gif).
  2. Hovering the mouse over the image produces a light ripple effect. Click and drag the mouse produces a more pronounced ripple effect (waves).
  3. The liquid density can be configurable.
  4. Include random droplets of rain.
  5. Include wind effects.
  6. Include falling leaves.

The toplevel VI submited must be named Making_Waves.vi and can be stored in an llb file if desired. The use of sub-vi's is allowed. Please include them all. Scores for this competition will be based first and foremost on the functionality of your model and realism. They will also be based upon coding style. For help with coding style, see Chapter 6 of the LabVIEW Development Guidelines attached: Download File:post-2-1126488648.pdf

Note:

  • All coding must be done in LabVIEW.
  • No external code, DLLs, CINs, exes, ActiveX, .NET, etc (DLL's or libraries that are part of the core LV are allowed)
  • Have fun!

Submit all solutions to: codingchallenge@lavausergroup.org. Do not post them to this thread. The deadline is Nov. 30th 2005. You can use this existing thread to discuss the challenge or to ask questions.

Good luck!

PS. The winner will have the choice of showing a special icon next to their name on the Forums. They will also have a special signature image. The details of these images will be revealed soon.

Link to comment
  • 2 weeks later...

This is more work than one would think at first glance.

Aren't all software projects :o

I've been thinking about texture mapping the image onto a surface and using the 3D plot to display it.

The plan is to warp the surface to simulate the wave motion.

So far I have been able to get RGB images displayed in the 3D display

(but only a flat surface, in 2D right now).

The big challenge there was the colormap, and I'm still not pleased with the display.

It looks like several colors are being clumped into one even though the image looks very nice in the PICTURE display.

Anyone have any thoughts on how to get better color mapping in my 3D plot?

Link to comment

I suggest you not use 3D plotting. Just a suggestion. It is not actually such a hugely complicated problem which is why people have coded it and added it to things like the logo animation that was posted. Look around a little, there's good info out there on how to do this without using a 3d mapping/rendering to make it look right.

Link to comment

Michael:

You mention in the challenge "the goal is to accomplish this challenge using the default picture control that comes with LabVIEW. If you know of a better native way to do this in LabVIEW, go right a head."

My version of LabVIEW 7.1.1 has several PICTURE FUNCTIONS that (according to the LabVIEW help documentation) are "NOT INCLUDED IN BASE PACKAGE".

I am not avoiding use of these picture functions in my coding efforts. I hope these are not the "IMAQ TOOLS and VIEWERS" you prefer us to avoid.

Link to comment
Michael:

My version of LabVIEW 7.1.1 has several PICTURE FUNCTIONS that (according to the LabVIEW help documentation) are "NOT INCLUDED IN BASE PACKAGE".

I am not avoiding use of these picture functions in my coding efforts. I hope these are not the "IMAQ TOOLS and VIEWERS" you prefer us to avoid.

This is alright. The picture functions you mention are fine.

Link to comment
OpenG?

Of course, no problem.

I also ment to ask if I can make more than one submission?

(first-try-in-case-I-don't-have-time-later submission, possibly followed by a refinement)?java script:emoticon(':clock:', 'smid_13')

smilie

Would all submissions count or only the last one? (can one person get first and second prize?)java script:emoticon(' :rolleyes: ', 'smid_22')

smilie

Link to comment
I also ment to ask if I can make more than one submission?

(first-try-in-case-I-don't-have-time-later submission, possibly followed by a refinement)?java script:emoticon(':clock:', 'smid_13')

smilie

Would all submissions count or only the last one? (can one person get first and second prize?)java script:emoticon(' :rolleyes: ', 'smid_22')

smilie

I'll list the winner and probably the next several runner ups. You can submit as many as you want until the deadline and I'll pick the best.

Link to comment
  • 4 weeks later...

I know I should not send my submission here but I was not able to send it to codingchallenge@lavausergroup.org since it is a standalone executable

Anyway, if we all agree, this is just for fun. Right ? So find below my submision. Heu... Yes, I know I'm all wrong since it is all done with LabWindows/CVI but anyway it was fun to do some coding this week-end

Give it a try :

Put the .exe (no virus, I promise) in a /temp directory and double click on water.exe

You may need CVI 7.1 runtime engine but for what I know it comes with CVI and MAX

Once the application window in on the screen, select a bmp file and move the mouse over the picture

While the application is running, using the file menu, you can pick another bmp file. Don't pick a big one because the application is then quite slow.

The making of :

- it is all in CVI

- as you see, nothing else than the exe is required and the size of the .exe is quite reasonnable (40 KB)

- no external DLL nor IMAQ Vision lib involved. It's all about pixel arithmetic

- the code use 3 threads.

- Double check but the processor load should be acceptable on an "up to date" PC

- the source code is splitted in two .c files (200 lines and 130 lines respectively)

Have fun and let me know about my "wrong" answer, Philippe

[Edit: Michael Aivaliotis: I removed the attachement]

Link to comment
  • 4 weeks later...
  • 5 weeks later...
Just a reminder that the deadline for the submission to the challenge is close approaching. There are only 2 weeks left!

I sent my submission to codingchallenge@lavausergroup.org back on November 16, 2005.

I was hoping for a confirmation that the submission was received. I saw another post saying their

email to codingchallenge@lavausergroup.org bounced (for them).

I sent a followup email to you later that week (but before the deadline) and I haven't heard anything.

Just wondering if it was ever received.

Thanks,

MGulley

Link to comment
  • 4 months later...

I'd like to announce the winners of the first LAVA coding challenge. The requirements of the challenge were to Model the ripple effects of moving a mouse over a liquid. The image size was set to 500px wide by 200px height and there was some room for bonus points where several elements could be added such as wind and droplets. Looking at the solutions you will notice that there are different approaches to the disturbance. The method that looks the most realistic is the one that draws droplets on the water and repeats with every mouse movement. Some cut the water in a straight line but this does not look realistic.

Two winners were chosen (a tie!) based on the following test images:

Download File:post-2-1147588392.zip

Winner 1: m3nth

LV711 code: Download File:post-2-1147587891.zip

Front Panel:

post-2-1147588580.png?width=400

Block Diagram:

post-2-1147588699.png?width=400

What I like about m3nth's solution was the incredible configurability and sheer number of features available. Lots of bonus point here.

Winner 2: Arno Euteneuer

LV711 code: Download File:post-2-1147589288.zip

Front Panel:

post-2-1147589413.png?width=400

Block Diagram:

post-2-1147589522.png?width=400

This is a nice and simple design that can handle the base image size and larger images with only a slight performance decrease. This implementation produced a very smooth response.

Honorable mention: Mike Gulley

LV711 code: Download File:post-2-1147589891.zip

Other Submissions worth mentioning:

Bruce Ammons: LV711 code. Also requires the IMAQ vision toolkit to be installed.

Download File:post-2-1147590235.zip

Moving forward i'd like to say thank you to ALL who submitted code to the challenge. The reason for the long delay in getting the results out was simply a lack of time on my part. Recognizing this fact and also the need to keep the LAVA challenges going, I have assembled a LAVA Coding Challenge Committee. This is a team of active LAVA members who have generously donated their time to help with the next coding challenge. The next coding challenge has been decided and will be announced soon. This time I will have some help along the way :) .

Link to comment

Congratulations to all who entered the coding challenge. It certainly wasn't an easy challenge (hence the defintion of the word :) ) and the winners and commended entries show that there were some really thoughtful and well-engineered entries - well done! :thumbup:

Link to comment

Wow.

That's some seriously impressive LabView code.

*edit*

I wasn't sure if it was just my laptop at first. But I get this same error on another desktop with M3nth's code:

Error 1 occurred at Property Node (arg 1) in Water Intesity.vi->Making_Waves.vi

Possible reason(s):

LabVIEW: An input parameter is invalid

---

NI-488: Command requires GPIB Controller to be Controller in Charge.

When I continue though, the code seems to run fine.

Link to comment

I believe auto error handling was on both machines.

There was another odd thing that happened on both machines as well. LabView completely locked up when attempting to Stop the program. On both computers LV froze hard and had to be terminated via the task manager.

I'm guessing it has to be some quirk common to both machines. (Probably the trojan that's sending out all of our private information) :rolleyes:

Link to comment
  • 1 month later...

Do you work off of multiple monitors.

I saw the same error. Suppose it's old news now anyways.

Wow.

That's some seriously impressive LabView code.

*edit*

I wasn't sure if it was just my laptop at first. But I get this same error on another desktop with M3nth's code:

Error 1 occurred at Property Node (arg 1) in Water Intesity.vi->Making_Waves.vi

Possible reason(s):

LabVIEW: An input parameter is invalid

---

NI-488: Command requires GPIB Controller to be Controller in Charge.

When I continue though, the code seems to run fine.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.