问题
I am planning create a site that lets users in finance visualize the price of a foreign exchange option in 3d. x = price of underlying, y = price of option, z = days left to maturity. In other words, rather than a simple option payout diagram, this would allow you, on the Z axis, to view what the P&L scenarios would be if you sold before expiry of the option.
In short, I want a visualizaion tool. But given that the surface of the P&L might be quite "curvy", it's going to be good for users to rotate around the space in real time. And it's going to be good to slice the surface up along any plane orthogonal to the axes, and move the slice around. I want it to be responsive and fast.
As you can see, quite ambitious (for me at least). Problem is, I want all this to work in a browser, and ideally, i'd like it to look great, potentially with lighting to make the "future time" parts of the surface darker, for example.
I have raided Amazon for books on Flash (the two Richard Shupe books), and I have the Red Book and Blue Books of OpenGL. They're quite hefty tomes, so I want to apply myself to the best solution. What do you suggest??
What should I think of Google's desire to create open standards for browser 3d? VapourWare? FutureWare?
Advice sought and appreciated. I have deadlines!! Thanks.
回答1:
This answer may contain out-of-date information. Please validate this answer and consider providing an answer with recent information.
For a project that you were going to start today, you'd be hard pressed to beat Flash, for a couple of reasons:
It works. Flash has been "enterprise-grade" for 10+ years now; you're not going to stumble into a showstopping bug or a host of undocumented calls the way you might with something a little more cutting edge (or rather, bleeding edge, as it were.)
It's Everywhere. Adobe claims that something like 97%+ of all browsers have the Flash runtime installed. That's a huge hurdle to have to overcome - you may have the coolest widget on the planet, but if your userbase has to download some wacky 3rd party plugin, most of them just won't bother.
It really is cross-platform. I've got mixed feelings about Flash personally, but man, it's cross-platform support is kind of amazing. Sure, linux support is spotty and and it won't run on my iphone, but that's about it.
On the flip side of the coin, I'm not sure there even IS a way to use OpenGL in a browser without a LOT of glue. Using OpenGL for a browser tool is starting to sound like a Java Applet, or a ton of atomic-powered javascript, and at that point, you've more or less reimplemented Flash. :)
回答2:
What you probably want is O3D.
回答3:
I may catch flak for this, but investigate the HTML5 canvas for drawing without needing any kind of plugin at all. You can use Processing.js to do a limited amount of 3D, but should be fine. Otherwise, I would look for a 3D flash engine. O3D is too much vapor ware at the moment.
回答4:
I'd suggest taking a look at the Coppercube 3D engine for flash, currently in beta. It might be overkill, or it might not meet your deadline, but it's pretty cool. There's also a demo available.
回答5:
One of the reasons Flash is so popular is that its always the same implementation. Whereas something more open standards based, you run into issues with different people interpreting corner cases differently.
Another big plus for me, for flash, is that it prints well. If you trigger printing from flash, printing gets rendered as vectors, so it scales really nicely for the printer. I make use of that in my gear template generator. (http://woodgears.ca/gear_cutting/template.html)
回答6:
I am going with Flash.
OpenGL is attractive in standalone apps due to performance and flexibility. But for immediate deployment looks like Flash gives me the basics of what I need, with growth potential as Adobe builds out the platform.
I am going to keep an eye on the open standards though, and try and code in a portable way ;)
Thanks all for the answers..
来源:https://stackoverflow.com/questions/941944/opengl-or-flash-for-3d-visualization-in-the-browser