LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Game of Life

Hi, 
I am a first year undergraduate studying Physics, programming is apart of my first year module. I have been set a project to create anything using any program I chose, LabVIEW being one. I was wondering if anyone has ever thought or made a VI of Game of Life and how it went, I have made one and it works pretty well, the next step in the difficulty for me would be to make it 3D, if anyone has done anything like this, I would be very intrigued to talk about it. This is my first post here, but thanks for any feedback:)

0 Kudos
Message 1 of 13
(3,850 Views)

The game  of life rules don't apply to 3D, so you will either need to devise your own rules, use someone else, or apply the 2D rules to n^3 planes in your 3D space.  If you already have the basic rule set working for 2D, you just need to do some itterative processing to implement a 3D solution using your 2D code.

 

Let us assume you are using a 10x10x10 cube.  There are 30 distinct planes (2D worlds) in this "universe".  Each inhabitant of this universe inhabits 3 planes of existance.  Simply evaluate each of the 30 planes, and store the results in a temporary universe, so as not to disturb anything prematurely.  Once you have processed all of the planes, you can then replace the real universe inhabitant positions with those of the temporary.

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
Message 2 of 13
(3,843 Views)

There are many examples of the game of life implemented in LabVIEW.  Just do a search for "game of life" on ni.com.  Here is a good one:

https://decibel.ni.com/content/docs/DOC-19902

 

Chris M

0 Kudos
Message 3 of 13
(3,828 Views)

@MoviJOHN wrote:

The game  of life rules don't apply to 3D, so you will either need to devise your own rules, use someone else, or apply the 2D rules to n^3 planes in your 3D space.  If you already have the basic rule set working for 2D, you just need to do some itterative processing to implement a 3D solution using your 2D code.

 

Let us assume you are using a 10x10x10 cube.  There are 30 distinct planes (2D worlds) in this "universe".  Each inhabitant of this universe inhabits 3 planes of existance.  Simply evaluate each of the 30 planes, and store the results in a temporary universe, so as not to disturb anything prematurely.  Once you have processed all of the planes, you can then replace the real universe inhabitant positions with those of the temporary.



Yeah I was thinking along those lines. But I am not sure if it would be possible to display in LabVIEW, I haven't programmed in LabVIEW for long, but I understand the basics, do you think the pre-set 3D graphs would work, or would I have to use another method?

0 Kudos
Message 4 of 13
(3,820 Views)

Lots of cool 3D things can be done in LabVIEW.  Check out some of the examples shipped with LabVIEW by going to Help >> Example Finder and searching 3D.

0 Kudos
Message 5 of 13
(3,809 Views)

The 3D Picture Control VIs make all kinds of things possible.

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
0 Kudos
Message 6 of 13
(3,804 Views)

@MoviJOHN wrote:

The 3D Picture Control VIs make all kinds of things possible.



Aah ok, thanks. I will look into it and hopefully get it working the way i want, if not i know who to look and where:)

0 Kudos
Message 7 of 13
(3,781 Views)

@Hooovahh wrote:

Lots of cool 3D things can be done in LabVIEW.  Check out some of the examples shipped with LabVIEW by going to Help >> Example Finder and searching 3D.


Never thought of that, I will do, thanks

0 Kudos
Message 8 of 13
(3,777 Views)

Yeah, 3D picture control is defo way to go. You will probably need to make your cells (cubes?) semi-transparent so you can see what's going on.

 

Check out the 'solar system' example that ships with LabVIEW for an example of some running 3D code.

0 Kudos
Message 9 of 13
(3,771 Views)

@ToeCutter wrote:

Yeah, 3D picture control is defo way to go. You will probably need to make your cells (cubes?) semi-transparent so you can see what's going on.

 

Check out the 'solar system' example that ships with LabVIEW for an example of some running 3D code.


A Solar System example? I wouldn't mind programming something like that too.. where you I go about finding that?

0 Kudos
Message 10 of 13
(3,765 Views)