Creating a Black Hole With OpenGL
There's a cool article on O'Reilly Net concerning using 3D graphic software to emulate black holes. Interesting article - with a lot of information about OpenGL and what you can do.
← Back to Stories (view on slashdot.org)
This brings up an interesting idea of applying the horsepower of video cards to other purposes. A modern 3D accellerator is basically a dedicated co-processor with it's own RAM that's optimized to do specific math tasks really, really fast.
I wonder if there are any serious scientific applications that could use this. If you are running a Beowulf cluster, you could possibly improve the performance of the entire cluster very easily. Of course, it would require custom software, but then Beowulf already needs that anyway.
"The axiom 'An honest man has nothing to fear from the police'
Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
Vintage computer games and RPG books available. Email me if you're interested.
Why is it a story on Slashdot?
---- SIGFPE
this sounds dangerous to me... i will have to report this to the authorities... they will want to know what is going on over there. the last thing i want is to get sucked up in a black hole right after i buy a new house. that would really www.suck.com .
-- Betting on the survival of the media industry is a serious risk. I advise investing elsewhere.
Sean
These rabid Linux enthusiasts who responded to your posts are never going to be able to see the forest for the trees. The postulate "Linux good && Windows bad" dominates every thought they conceive with regards to computing, and they will never be able to expand beyond it and see that if you're happy programming under DirectX, then more power to you.
It's sort of like the missionaries of old. They thought they were "helping" the natives of the cultures they visited, because they were too narrow-minded to conceive that anyone could be happy without living as people in their own culture lived.
Maw! Get me that NT CD, I want implosions now, damnit.
cperciva, have you been giving yourself mod points?
Basically, you create particle accelerators to prove that the nature actually acts the way our mathematical models presume it does...running simulations on a 3D card really doesn't prove anything as it will always work after our mathematical models...after all humans program it!
We have no way of knowing for absolutely sure that black holdes works the way the 3D cards say...I once read that you could travel through dimensions/time through a black hole. I'm not saying you can, I'm saying thatyou certainly can't prove it (or the opposite) by programming in OpenGL.
You're welcome!
// Clear the background to black to simulate the emptiness of space
glClearColor( 0, 0, 0, 0 );
glClear( GL_COLOR_BUFFER_BIT );
// This accurately models the black-hole not emitting any light
glColor3f( 0, 0, 0 );
// Draws the boundary of the black hole
glutSolidSphere( 1, 10, 10 );
Nobody really chooses OpenGL over D3D for 'ease-of-use' anymore. This might have been true during the days of DirectX 3. Ever since DX5 (and especially 6 & 7), D3D is as easy to use as OpenGL.
Of course, I'm not really advocating D3D use here. I'm a graphics programmer myself and choose OpenGL, but for portability reasons.
If the DX APIs were cross platform, I'd use them.
Its really nice to have integrated sound/3D and 2D framebuffer APIs...As is now, I tend to use SDL (which more or less mimics a lot of DirectX functionality, but has a cross-platform core and supports OpenGL)
Your observation is a little bit dated, things have changes. Brian has a good relationship with SGI and has AFAIK was given the conformance tests to run a long time ago under a special agreement to ensure Mesa is high quality.
Also the license for OpenGL has changed recently, the SI is now Open Source and you can pretty much use the OpenGL trademark if it runs of a free operating system and passes the appropriate tests. The conformance tests are also more freely available as announced recently.
The big issue for OpenGL is quality, you can't call any old thing OpenGL. It requires testing, and everyone who has ever shipped OpenGL has been required under license to pass those tests. Basing a driver on Mesa is not sufficient, you must test the driver implementation to be allowed to call it OpenGL. So saying a particular implementation on a specific set of hardware is OpenGL has a very specific meaning. If this wasn't the case OpenGL would be of much less value as a standard.
Actually, the real value is not so much in the stories themselves. Almost invariably, when someone posts a stupid story, somebody who knows what they're talking about comes up and corrects them. It's neat actually.
In fact, your post made me realize that my graphics knowledge from 5-6 years ago is horribly out of date, and that I need to read up on it a lot before I say anything about it again. :-)
Need a Python, C++, Unix, Linux develop
Great, now all we need are pocket fusion-generators and a better display technology and every datacenter can have its own universe!
I don't mean to be all negative, it's a nice demo an all, but there are more OpenGL particle-systems demos out there than there are particles in this one.
Got Rhinos?
Come on, this is just a classical gravitational model piped into an OpenGL model. There are no visual distortion caused by the black hole, and no relativistic physics anywhere.
If you're going to call it a black hole simulation, do it right. Otherwise, call it a solar system simulation.
Tarsnap: Online backups for the truly paranoid
I'll have to give Microsoft credit for standardizing OpenGL on Windows. Because it sure isn't anywhere near organized on Linux!
"Ancillary does not mean you get to rule the world." --U.S. Circuit Judge Harry Edwards, speaking to the FCC's lawyer
Let's see, I think even my watch can run OpenGL/MesaGL code. Come on, if you want to use DickX, you have to use Microsoft Windows. There's no standard to it other than Microsoft's agenda. OpenGL ran fine on Win32, but no, MS couldn't have someone else succeeding on their platform. It's the same with Netscape. MS wants to dominate everything that runs on MS and will go to all ends to kill competition. OpenGL/MesaGL runs on more platforms than I can spit at - it's as close to a Standard as you'll come in 3D development. DirectX is just another Microsoft trap. Once you've developed in that, you'll be trapped in Microsoft and porting to another platform is sheer hell. IE - Lokisoft expended much effort porting Heavy Gear from DickX to OpenGL. Now it just needs to be tweaked a little to run on any of a number of platforms, including Microsoft.
But then, you know all this and are just stoking the flames, right?
-- I think, therefore I...Uhm, what was I saying?
I already have a black hole simulator on my desktop. It's called a computer, defined as a black hole in the desktop which continually sucks money out of my wallet, at the speed of light, and is never seen again. I assume done there is a mass of pennies so dense that very few practical value rays fail to escape. Such is a hobby...
The logical path for this is to: Laptop, palm and then some pocket computer which could directly interface to the wallet and shorten the path the money has to move.
A feeling of having made the same mistake before: Deja Foobar
It's sort of like the missionaries of old. They thought they were "helping" the natives of the cultures they visited, because they were too narrow-minded to conceive that anyone could be happy without living as people in their own culture lived.
It's not that they can't be happier in their own culture, but that they can be happier living life differently. Sometimes it's just that people are better off living life differently. It's the same thing with Linux Advocacy. The most advocates (not trolls) think that Windows users would be happier better off in the long run if they weren't using Windows. This may or may not be true, but it is not discounting that Windows is getting the job done, and the users may actually be happy with the current system.
treke
More fun like that at the OpenGL Challenge.
Most entries are GLUT or near enough to compile on Linux, Mac etc. Lots of cool ideas.
While there are dozens of other sites on the web devoted
to Stephen Hawking's scientific achievements, I am unaware of a single
site (aside from this one) devoted to his career as a lyrical terrorist.
Mr. Ska
Why do Slashdot keep posting stuff like this on computer graphics? Any one how reads openGL.org knows that there are about a zillion particle demos out there.
Some time ago there was a story about AGP 8X and who ever wrote the story asked why we would need it since we already got firewire.... Don't even know were to start complaining about that one.
And its not like there hasn't been any graphics storys to cover. The advancements in hardware accelerated programmable shades has fundamentally changed the way people think of graphics hardware, softimageXSI for Linux, Linux on onyx3, the alternative to openGL SMASH, rendering whit natural light, new 3D displays....the list goes on and on.
I think that slashdot is one of the greatest sites on the net but every time i read some thing regarding my area of expertise that is wrong I start to question the credibility of slashdot on areas i don't know much about.
Please, if you what to cover graphics please do so, but get some one who works whit graphics to do it. A "ask slashdot" on how to improve the site may also be a good idea.
Sorry about the rant, i just could not get my fingers of the keyboard.
I just have to say thank you, Enoch Root. By getting a goatse.cx link modded up as informative, you have destroyed my last scraps of faith in humanity. I can't decide whether to go on a multi-state murder and robbery spree, or just shoot myself.
> Is there a DirectX version?
... remember, BOTH API's are functionally equivalent.
;-)
Why? Doesn't the OpenGL version work?
Lets end this now before it erupts into a lame flamefest about "OpenGL roxs.. Direct3D blows"
> I'd prefer to work in that API.
Which one? DirectX or D3D ? Yeah, DirectX is ok.
However, I'll take the ease-of-use of OpenGL over D3D anyday. Carmack does too, among a few developers. I wonder why?
A nice clean, orthogonal, and portable rendering API, what more do you want?
Cheers
Having done some development with HL mods, I agree with your statement that a very small percentage of the source code consists of 3D-API related things (probably even less than 2-5%). However, while the percentage of the source code is small, the percentage of the processor load is very high. The geometry transform and lighting (handled by the API, in systems without coprocessors for that) make up about half the CPU load, all of it doing simple and redundant geometry transformations.
------------------
Do it! Use Java3D, it even gets hardware-accelerated on some platforms...
My computer simulates a black hole well enough by sucking all my money in to it, thank you very much.
That or my girlfriend. Do you know how expensive movies are nowadays?
---
I wear pants.
...I didn't think OpenGL sucked _that_ much.
*rimshot*
-lb
The humor comes from noting that opengl.org, the official OpenGL website, refers to the Mesa 3D library as "Mesa OpenGL". Which, according to their own rules, they're not supposed to do...
Upon hearing this news at Redmond, a Microsoft PR person had this to say...
"It's good to hear that technology had gone so far forward, but we should remind you that Mircrosoft is still at the head of innovation. So OpenGL can simulate a black hole, DirectX has sucked that hard for quite some time."
(Obligitory, I know.)
--
Feminism is the wild notion that women are human beings.
I would argue that Hawking IS an explorer--more so than a non-theoretician. If you believe (as I do) that the laws of physics (and especially of mathematics) are REAL in the platonic, idealistic sense then what Hawking does is exploration. He's certainly not an inventor...
--
Linux MAPI Server!
http://www.openone.com/software/MailOne/
Linux MAPI Server!
http://www.openone.com/software/MailOne/
(Exchange Migration HOWTO coming soon)
3D APIs get talked about as if they're doing all the work. OpenGL and Direct3D are just that--APIs--and there's nothing magical about them. It's not like OpenGL is doing the "creating" here. It's just being used for the back-end polygon rendering. That's it. The rest of the code has nothing to do with OpenGL.
One other thing I'd like to add while I'm here is that in a typical 3D game, only about 2-5% of the code involves 3D API calls. Two to five percent. There's a consistent myth that OpenGL rendering is the bulk of most 3D games and such, which is certainly not even close to true.
Anyway, the two APIs are not functionally equivalent, unless they've added 3D textures to DirectX while I wasn't looking.
--
It's a
-- Danny Vermin
Shame, really, because there is potential to use OpenGL's image processing hardware to actually calculate large 2D fluid dynamics problems, and doing that would definitely count as news. You'd blow a Cray out of the water with a Voodoo3.
--
It's a
-- Danny Vermin