Staredit Network > Forums > Technology & Computers > Topic: 4D Functions Generator
4D Functions Generator
Feb 25 2010, 12:40 am
By: payne  

Feb 25 2010, 12:40 am payne Post #1

:payne:

I am studying in maths. Recently, we've been given a cool trick to be able to represent ourselves any complex 4D functions in 3D. It really amazed/inspired me.
Moreover, next year, I'll have a huge session-work to realize which has to rely highly on mathematics... I though I could program something that would show the evolution of a 4D in 3D.
I have all equations in my head. The same for the basic idea of how I want the program to work, but I do not have the skills to create such a thing.
I am asking you guys if someone would like to help me out on this.

I am not -that- much of a stranger to programming (I've coded a lot of things, but only in ActionScript :P ) and I really wish to learn more about this world (after all, I think I'll become a Software programmer that would design mathematic models or shit like that).

Questions [Updated often]:
- First of all, which language do you suggest me ? I guess it's going to be C++, but we never know.
C++ it is.
- Which (Free) C++ Compiler should I use ?

The rest will come in time and place.

Thanks for help/support/ideas,
Payne (aka Jérémi Grenier B.)

Principle:
Quote from Myself, later in this topic
The principle is simple:
Let's say you have a 3D function that you must draw. Assuming you do not know how it looks, you'll set one of the three variable as a constant and interpret the function left by making it in a form of "y = something (which should really only have 'x' as variable)".
Once that's done, you should be able to draw the function in a simple x/y axis 2D graphic. Once that's done, you set the third variable of the initial function to a new constant and repeat the same process.
In my case, I'd set the constants as near as possible to each other and I'd make the computer memorize every graphic that resulted from the process.
Once a good enough variety of data is gathered, I'd ask the program to find a good scale to represent the graphic. After, the screen would pass quickly all the graphics one after an other from the same point of view (the viewer should be able to decide it).
Seeing it like this (as an animation more than a superposition) makes the interpretation of 4D as time, but it should really be a superposition of all these 3D figures in a 4D world.
What's interesting is that we can always represent 'n+1' dimensions into 'n' dimension. The problem is that the screen is in 2D. ;o
Anyways, you get the idea?


Post has been edited 4 time(s), last time on Feb 25 2010, 3:36 am by payne.



None.

Feb 25 2010, 2:09 am Jack Post #2

>be faceless void >mfw I have no face

Yep, C++. Although, what are you trying to do? 3D models of some sort? Plus, do you mean 3D plus time when you say 4D?



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Feb 25 2010, 2:57 am Centreri Post #3

Relatively ancient and inactive

It really depends, you can do that kind of modelling in many languages, including C++ and Java. You'll probably want to do C for this little project. Also, if you want to do it quickly without necessarily learning a complete new language, the required computer science class at my school taught (amoung other languages) Netlogo, which allows for easily modelling. It's built using Java and can be viewed through a browser or through the program, making it rather nice. I'm not completely certain what you mean by 'show the evolution of a 4D in 3D', but Netlogo might serve your needs and take much less time to finish this project. It's not, however, a serious programming language, so... yeah. Don't expect to work for NASA using this alone.



None.

Feb 25 2010, 3:17 am payne Post #4

:payne:

The principle is simple:
Let's say you have a 3D function that you must draw. Assuming you do not know how it looks, you'll set one of the three variable as a constant and interpret the function left by making it in a form of "y = something (which should really only have 'x' as variable)".
Once that's done, you should be able to draw the function in a simple x/y axis 2D graphic. Once that's done, you set the third variable of the initial function to a new constant and repeat the same process.
In my case, I'd set the constants as near as possible to each other and I'd make the computer memorize every graphic that resulted from the process.
Once a good enough variety of data is gathered, I'd ask the program to find a good scale to represent the graphic. After, the screen would pass quickly all the graphics one after an other from the same point of view (the viewer should be able to decide it).
Seeing it like this (as an animation more than a superposition) makes the interpretation of 4D as time, but it should really be a superposition of all these 3D figures in a 4D world.
What's interesting is that we can always represent 'n+1' dimensions into 'n' dimension. The problem is that the screen is in 2D. ;o
Anyways, you get the idea?



None.

Feb 25 2010, 3:20 am Centreri Post #5

Relatively ancient and inactive

I'm a bit tired (well, that's my excuse for just skimming through it), but, alas, Netlogo isn't much good at 3D rendering, so yeah, you'll want to use Java or C++. Unless someone has another idea or I misunderstood.



None.

Feb 25 2010, 3:24 am CecilSunkure Post #6



Yeah you're going to want to be doing high-performance rendering with C++.

Sounds like you're hitting on things Linear Algebra covers. With linear algebra you can represent graphs with as many dimensions, mathematically, as you want. The cool thing is that the math doesn't even change all that much. Going from 2D calculations to 3D really sort of just adds one more coordinate to calculate.

If you want, I know of a couple good links if you're interested in learning stuffs. But I'm still a bit unsure of what you want to learn ;P



None.

Feb 25 2010, 3:34 am payne Post #7

:payne:

Quote from name:Cervantes
Yeah you're going to want to be doing high-performance rendering with C++.

Sounds like you're hitting on things Linear Algebra covers. With linear algebra you can represent graphs with as many dimensions, mathematically, as you want. The cool thing is that the math doesn't even change all that much. Going from 2D calculations to 3D really sort of just adds one more coordinate to calculate.

If you want, I know of a couple good links if you're interested in learning stuffs. But I'm still a bit unsure of what you want to learn ;P
For the maths, I'm okay ;)
For the coding, I want tuts ^^
Btw, which Compiler is the best for C++ ?



None.

Feb 25 2010, 3:36 am CecilSunkure Post #8



Uhm it depends on your skill level, and what you want it to do. I already suggested what I know to be good for beginners. What do you want to learn coding wise? Just general C++? I have like 500 different C++ books I can give you.



None.

Feb 25 2010, 3:39 am Centreri Post #9

Relatively ancient and inactive

I believe that there are a ton of different compilers that'll all work. I'll recommend instead Eclipse IDE for C++. Never had any experience with the C++ aspect of it, but I found it speeding things up a lot when I worked with Java and got to compare using it to using barebones tools like... emacs.



None.

Feb 25 2010, 6:07 am Rantent Post #10



I think it may be best to define your scales before you try to build the model. Obviously, your working with functions, (or relations.) and as such they will typically have domains through vast regions, of which you will probably only want a small portion to view. So my suggestion is to begin by defining limits to your test values for either your input or output. Then begin a simple scan through your set of x,y,z,w values. It will probably be a benefit to not scan through values "as near as possible" because this value is really small (-> 1/infinity...) I would advise using a parameter to define the step size you use, so you can obtain a rough sketch of a function if that is all you need. Unless, of course, your sitting on top of a spare super computer.

When that's completed, simply report them as a series of 3d graphs. Some simple linear algebra along with polar coordinate conversions will do the job for each rendering.

Also, there are already programs out there that can do this, and being someone who programs mathematical models for things is not all that exciting. (I should know, I'm working on a program modeling the chemical interactions of atoms on crystal surface structures. It's a lot of work to see very little.)

My advice would be to build a fractal or L-system, they are way more fun to play with.



None.

Feb 25 2010, 6:33 am payne Post #11

:payne:

Quote from Rantent
I think it may be best to define your scales before you try to build the model. Obviously, your working with functions, (or relations.) and as such they will typically have domains through vast regions, of which you will probably only want a small portion to view. So my suggestion is to begin by defining limits to your test values for either your input or output. Then begin a simple scan through your set of x,y,z,w values. It will probably be a benefit to not scan through values "as near as possible" because this value is really small (-> 1/infinity...) I would advise using a parameter to define the step size you use, so you can obtain a rough sketch of a function if that is all you need. Unless, of course, your sitting on top of a spare super computer.

When that's completed, simply report them as a series of 3d graphs. Some simple linear algebra along with polar coordinate conversions will do the job for each rendering.

Also, there are already programs out there that can do this, and being someone who programs mathematical models for things is not all that exciting. (I should know, I'm working on a program modeling the chemical interactions of atoms on crystal surface structures. It's a lot of work to see very little.)

My advice would be to build a fractal or L-system, they are way more fun to play with.
Good ideas in there. Thanks for sharing.
What is a L-system ?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: IlyaSnopchenko