Michael Aivaliotis Posted September 12, 2005 Report Share Posted September 12, 2005 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? 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.zipThe 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: Ability to load any user defined image (jpg or gif). Hovering the mouse over the image produces a light ripple effect. Click and drag the mouse produces a more pronounced ripple effect (waves). The liquid density can be configurable. Include random droplets of rain. Include wind effects. 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.pdfNote: 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. Quote Link to comment
Khalid Posted September 13, 2005 Report Share Posted September 13, 2005 All you need to do is participate in our first official LAVA coding challenge. Hmm.. every participant gets a t-shirt and a mug? Or am I thinking wishfully? -Khalid Quote Link to comment
Michael Aivaliotis Posted September 13, 2005 Author Report Share Posted September 13, 2005 Hmm.. every participant gets a t-shirt and a mug? Or am I thinking wishfully? -Khalid 6115[/snapback] Wishfully... Read again.... Quote Link to comment
MGulley Posted September 21, 2005 Report Share Posted September 21, 2005 This is more work than one would think at first glance. Aren't all software projects 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? Quote Link to comment
m3nth Posted September 22, 2005 Report Share Posted September 22, 2005 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. Quote Link to comment
MGulley Posted September 28, 2005 Report Share Posted September 28, 2005 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. Quote Link to comment
Michael Aivaliotis Posted September 28, 2005 Author Report Share Posted September 28, 2005 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. Quote Link to comment
BChandler Posted September 29, 2005 Report Share Posted September 29, 2005 Is is ok to use vi's from OpenG or vi's derived from one of them them? (if the code is included in the llb you submit). Quote Link to comment
Michael Aivaliotis Posted September 30, 2005 Author Report Share Posted September 30, 2005 Is is ok to use vi's from OpenG or vi's derived from one of them them?(if the code is included in the llb you submit). Of course, no problem. Quote Link to comment
BChandler Posted September 30, 2005 Report Share Posted September 30, 2005 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(' ', 'smid_22') smilie Quote Link to comment
Michael Aivaliotis Posted September 30, 2005 Author Report Share Posted September 30, 2005 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(' ', '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. Quote Link to comment
40tude Posted October 24, 2005 Report Share Posted October 24, 2005 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] Quote Link to comment
m3nth Posted October 25, 2005 Report Share Posted October 25, 2005 For the paranoid, I'll confirm it's a CVI executable, no virus per the latest version of Symantec. I like it... I think it looks very realistic. As with most things of this nature, it runs great when the pixel count is low. Quote Link to comment
Michael Aivaliotis Posted November 16, 2005 Author Report Share Posted November 16, 2005 Just a reminder that the deadline for the submission to the challenge is close approaching. There are only 2 weeks left! Quote Link to comment
MGulley Posted December 15, 2005 Report Share Posted December 15, 2005 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 Quote Link to comment
Michael Aivaliotis Posted May 14, 2006 Author Report Share Posted May 14, 2006 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: Block Diagram: 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: Block Diagram: 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 . Quote Link to comment
i2dx Posted May 14, 2006 Report Share Posted May 14, 2006 my congratulations to the two winners. I took a quick look at both winning solutions, and I think it's an impressing piece of work. :worship: Quote Link to comment
crelf Posted May 14, 2006 Report Share Posted May 14, 2006 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: Quote Link to comment
pallen Posted May 15, 2006 Report Share Posted May 15, 2006 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. Quote Link to comment
Michael Aivaliotis Posted May 15, 2006 Author Report Share Posted May 15, 2006 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 I didn't get any errors on my computer. Do you have the automatic error handling on? Quote Link to comment
pallen Posted May 15, 2006 Report Share Posted May 15, 2006 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) Quote Link to comment
Norm Kirchner Posted June 16, 2006 Report Share Posted June 16, 2006 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.