Computer Graphics With Java
Michael Grady writes "Computer graphics has become an
indispensable part of mainstream computing and the undergraduate
course in computer graphics programming is often one of the most
popular courses in the curriculum. In the early days, such courses dealt with low level
implementation details and algorithms such as converting lines to
pixels, filling rectangles, view clipping and anti-aliasing. When OpenGL arrived on the scene, it was welcomed as an efficient and
powerful, procedure-oriented library that kept many of the low level
details out of sight. The sort of projects that could be tackled in
an introductory course became much more impressive. That was back in the 90's. Is
there a way to build a course covering the basic computer graphics
concepts and techniques which takes advantage of object orientation
and higher levels of abstraction? I believe the authors of Computer
Graphics using Java have found a way." Read below for Michael's review
Computer Graphics Using Java 2D and 3D
author
Hong Zhang and Y. Daniel Liang
pages
462
publisher
Pearson Prentice Hall
rating
8
reviewer
Michael Grady
ISBN
0-13-035118-0
summary
Introduction to computer graphics concepts and techniques using Java 2D and 3D
Their strategy is to teach by example using the comprehensive, high level interfaces provided by Java 2D and Java 3D. Their examples are often well chosen and fun. The programming exercises are entertaining and appropriate.
About one third of the book is devoted to 2D graphics and covers the usual topics: coordinate systems, modeling, constructive area geometry, color models, affine transformations, compositing, splines, clipping, fonts, raster images, animation and image processing. As anyone who has worked in this area knows, Java 2D provides a beautifully designed set of classes for high quality 2D graphics and imaging. This part of the book could also serve as an excellent introduction for any programmer who wants to begin exploring its functionality.
Where the book really shines is in the examples. My favorite 2D examples include:An interactive demo of the RGB Color model which also illustrates constructive area geometry. An efficient rendering of the Mandelbrot set as a raster image. An elegant analog clock that shows how to use the Timer class in animation. An interactive demo of the common 2D affine transformations.
Surprisingly, none of the code uses anti-aliasing, even though Java 2D does a great job smoothing rough edges. In computer graphics circles, this is a faux pas — a violation of accepted, although unwritten, social rules, and points must be deducted for this omission. But if you add the required one line of code, most of the examples look pretty good.
The last two thirds of the book are devoted to 3D graphics programming, which reflects a common emphasis in the course at the undergraduate level. Coverage includes scene graphs, the rendering pipeline, 3D modeling, affine and projective transformations, illumination and reflection models, texture mapping, adaptive rendering, animation and interactivity, as well as object oriented graphics concepts such as behavior dynamics.
Java 3D provides a high level, object oriented framework for 3D graphics programming, with about 360 classes. For those who are used to programming with OpenGL, the Java 3D mindset may require a bit of indoctrination. It's based on the concept of a scene graph, and makes a lot of sense from an object oriented programming viewpoint.
Basically, a scene graph is a data structure for organizing the objects of a scene. We mean objects in the object oriented sense. Java 3D objects may be responsible for geometric, transformation, illumination, shading or behavioral data. The nodes of the scene graph represent objects and the edges represent a necessary connection. For example, a transformation node may be connected to a node representing a cube. The corresponding transformation object defines how the cube should be rotated, scaled, etc. In traversing the graph from its root, the Java 3D rendering engine finds all the information required to render the scene. It's a cool way to do computer graphics at a higher level of abstraction than programming directly with OpenGL.
Once again, many of the examples are excellent for an introductory text. My favorite 3D examples include: The classic spinning dodecahedron. This example shows that setting up the scene geometry is pleasantly intuitive in Java 3D. The ease of computing the normal vectors of all plane surfaces using the NormalGenerator class is a good illustration of the power of object oriented programming. Transformations, lighting and material properties are handled by dedicated classes. An interactive illustration of the common 3D affine transformations showing the effect of modifying transformation matrices. The mirror image of rotating 3D text that demonstrates the effect of composing transformations. How to generate a torus mesh. The canonical Utah Teapot.
Once again,the code does not use anti-aliasing, even where it is badly needed.
One of the benefits of using the Java platform is the extensive support for networking, multithreading, multimedia, database access and web services. For the most part, none of these benefits are exploited in the text. But that is probably the subject for a second course in computer graphics using Java.
All in all, it's clear that the authors are excellent teachers. This shows in their effective use of the teaching-by-example style. As stated in the preface, the authors intended their book for students and computer professionals who want to learn basic computer graphics concepts and techniques and who want to get started in programming with the Java 2D and 3D APIs. I believe they have succeeded in this goal, and if you are in this group of readers, I can confidently recommend their book.
You can purchase Computer Graphics Using Java 2D and 3D from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Their strategy is to teach by example using the comprehensive, high level interfaces provided by Java 2D and Java 3D. Their examples are often well chosen and fun. The programming exercises are entertaining and appropriate.
About one third of the book is devoted to 2D graphics and covers the usual topics: coordinate systems, modeling, constructive area geometry, color models, affine transformations, compositing, splines, clipping, fonts, raster images, animation and image processing. As anyone who has worked in this area knows, Java 2D provides a beautifully designed set of classes for high quality 2D graphics and imaging. This part of the book could also serve as an excellent introduction for any programmer who wants to begin exploring its functionality.
Where the book really shines is in the examples. My favorite 2D examples include:An interactive demo of the RGB Color model which also illustrates constructive area geometry. An efficient rendering of the Mandelbrot set as a raster image. An elegant analog clock that shows how to use the Timer class in animation. An interactive demo of the common 2D affine transformations.
Surprisingly, none of the code uses anti-aliasing, even though Java 2D does a great job smoothing rough edges. In computer graphics circles, this is a faux pas — a violation of accepted, although unwritten, social rules, and points must be deducted for this omission. But if you add the required one line of code, most of the examples look pretty good.
The last two thirds of the book are devoted to 3D graphics programming, which reflects a common emphasis in the course at the undergraduate level. Coverage includes scene graphs, the rendering pipeline, 3D modeling, affine and projective transformations, illumination and reflection models, texture mapping, adaptive rendering, animation and interactivity, as well as object oriented graphics concepts such as behavior dynamics.
Java 3D provides a high level, object oriented framework for 3D graphics programming, with about 360 classes. For those who are used to programming with OpenGL, the Java 3D mindset may require a bit of indoctrination. It's based on the concept of a scene graph, and makes a lot of sense from an object oriented programming viewpoint.
Basically, a scene graph is a data structure for organizing the objects of a scene. We mean objects in the object oriented sense. Java 3D objects may be responsible for geometric, transformation, illumination, shading or behavioral data. The nodes of the scene graph represent objects and the edges represent a necessary connection. For example, a transformation node may be connected to a node representing a cube. The corresponding transformation object defines how the cube should be rotated, scaled, etc. In traversing the graph from its root, the Java 3D rendering engine finds all the information required to render the scene. It's a cool way to do computer graphics at a higher level of abstraction than programming directly with OpenGL.
Once again, many of the examples are excellent for an introductory text. My favorite 3D examples include: The classic spinning dodecahedron. This example shows that setting up the scene geometry is pleasantly intuitive in Java 3D. The ease of computing the normal vectors of all plane surfaces using the NormalGenerator class is a good illustration of the power of object oriented programming. Transformations, lighting and material properties are handled by dedicated classes. An interactive illustration of the common 3D affine transformations showing the effect of modifying transformation matrices. The mirror image of rotating 3D text that demonstrates the effect of composing transformations. How to generate a torus mesh. The canonical Utah Teapot.
Once again,the code does not use anti-aliasing, even where it is badly needed.
One of the benefits of using the Java platform is the extensive support for networking, multithreading, multimedia, database access and web services. For the most part, none of these benefits are exploited in the text. But that is probably the subject for a second course in computer graphics using Java.
All in all, it's clear that the authors are excellent teachers. This shows in their effective use of the teaching-by-example style. As stated in the preface, the authors intended their book for students and computer professionals who want to learn basic computer graphics concepts and techniques and who want to get started in programming with the Java 2D and 3D APIs. I believe they have succeeded in this goal, and if you are in this group of readers, I can confidently recommend their book.
You can purchase Computer Graphics Using Java 2D and 3D from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
I didn't take this class back when I studied computer science. It was kinda boring at that time. But maybe time has changed now.
...don't let friends code in Java.
"I've spent my whole life figuring out crazy ways to do things. It'll work." -- Montgomery Scott, "Relics"
You don't need antialiasing if you are rendering with an interval engine like this one:
http://sunfishstudio.com/
stuff |
Use C# instead.
And before anyone marks this as a troll, C# supports unsigned values. Java does not. Since RGB color spaces are frequently represented as unsigned values between 0 and the maximum word size (usually 8-bit) this makes working with computer graphics in Java either a giant pain in the ass, or a word size larger than the permitted range. (For example, using shorts instead of bytes.)
For 3D work, you can usually skip this, since most 3D work uses floating point values, but you still have times when it would be really nice if Java supported unsigned types - which makes doing the same task in C# plain easier than in Java. (And this ignores speed and memory issues. C# makes inline assembly possible, Java makes it just plain slow.)
I've always been under the Impression that Java can't use hardware rendering, wouldn't that restrict usage for more intense applications?
You mad
Is there a way to build a course covering the basic computer graphics concepts and techniques which takes advantage of object orientation and higher levels of abstraction? I believe the authors of Computer Graphics using Java have found a way."
Why must you ask rhetorical questions of me???
Even those who arrange and design shrubberies are under considerable economic stress at this period in history.
out of lisp with some calls to C. I don't see why language would be a barrier for the basic stuff - computers nearly 8 years ago were fast enough to handle it.... we just started with the basic lineto function as well.
> Surprisingly, none of the code uses anti-aliasing, even though Java 2D does a great job smoothing rough edges. In computer graphics circles, this is a faux pas -- a violation of accepted, although unwritten, social rules, and points must be deducted for this omission. But if you add the required one line of code, most of the examples look pretty good.
Not anti-aliasing is a social faux-pas? Give me a break.
... relatively easy to program with and that it probably does a great job handling the coding side. If I were making a large-scale program I still think it would be worth taking the time to do it in C++ or another direct compile language. This definitely will hit the mark in helping people make small web apps with great GUI's or web games, but when clock ticks are crucial, I think that Java's place is still very limited.
High Performance it ain't. There are better ways.
First of all, I've used Liang's introductory Java book in classes I've TAed, he is quite good.
As for Java graphics programming itself, it's definitely a mixed bag, but in general more good than bad. Back in my undergraduate days I took two courses for Java graphics and Java game programming. If you're already familiar with the language, it's a great tool for learning the basics and mid-level game-oriented 2D and 3D programming. Java has a lot of great tools for all kinds of design, and the speed-issues are not a concern with JIT and APIs that take advantage of hardware acceleration. And Java's easy network programming lets you build some interesting projects.
That said, people seriously thinking about futures in game development should be learning DirectX and C++ as soon as possible. OpenGL is great, and if you're doing cross-platform work it's obviously the right choice. But DirectX is the standard now; even Carmack hasn't been too hard on it lately. It's managed to make great strides while the OpenGL committee squabbled.
Unfortunately, teaching computer graphics in Java3D locks the aspiring developer into the Java platform. At least with OpenGL, you're not locked into any particular programming platform and have more choices in that regard. That makes learning OpenGL easier as well, since you don't have to already be a Java developer to pick up OpenGL and can instead learn it in your favorite language. And, at this stage in the game, there are plenty of Object-Oriented APIs based on OpenGL available.
Life would be easier if I had the source code.
"It's a cool way to do computer graphics at a higher level of abstraction than programming directly with OpenGL."
Wake me up when Java 3D contains native support for NURBS.
I am with Linus on this one.
Unlike RMS he always makes his case intelligently. His contribution to FOSS is unmatched.
He deserves everyone's admiration. To hell with GPL v3
Java is about the last language id use for anything involving graphics.
I'm no Java hater, I think it owns when it comes to developing maintainable applications and deployment across multiple platforms, but lets be realistic, it's slow.
One could argue that it still has merit in an academic sense, for teaching the basics of graphics programming, but even that is kind of flawed. You probably want to avoid OOP in general when it comes to the actual graphics component of an application, as it adds overhead. Not only is Java itself slow, but the way in which it approaches graphics is probably the worst way to approach it in any language performance wise.
JAVA really is a brilliant achievement. It comes with nearly everything built in, and what is not included is easy to make. The simplicity of Graphics in JAVA is unsurpassed in any real language, and has huge capabilities. Even using OpenGL with JAVA is possible. This work is exactly what is needed to get more people using JAVA and revolutionary in the way of graphics. I still remember trying to draw a house with Assembly and C++ using only native libraries. JAVA makes life a lot easier, and graphics possible for all.
There is an enormous amount of work done in the Java 3d api, unfortunately hardly anyone uses it - I counted only a handful of games made - most not really commercial quality. It's ironic that the mobile 3d version has had a lot more success, considering how limited mobile phones are.
M. Guzdial's "Introduction to Computing and Programming with Java: A Multimedia Approach" was used in an introductory Java course that I took during Intersession this year. It doesn't focus on creating graphics, or 3D objects (which I imagine would be pretty daunting for a lot of people), but rather bases its lessons around modifying already extant images and sound files, systematically teaching the student how various aspects of OOP work, and giving them an obvious 'real world' use for programming.
Historically, scene graph APIs haven't been too useful. There are successful drawing APIs, like OpenGL, and game engines, but the in-between middleware hasn't been that useful. SGI Inventor, later Open Inventor, was the classic in that space, and it's not used much any more.
Java 3D is abandonware. Sun wrote it, badly, and it's now a "community source project", meaning Sun doesn't support it any more. I used it in its early days and wasn't impressed. The Java3D collision detection system was both badly designed and badly implemented. The general consensus was "give us an OpenGL binding and get this turkey out of the way".
(you knew it was coming) we had to deflect the electron beams ourselves using little magnets we had dug out of the ground with our bare fingernails.
ccalam - acoustic versions of new songs.
Stay tuned for his next book: Implementing Databases using LISP.
I like Java, I really do. But bloody hell... there's fanboys, and there's Java fanboys.
The worst of it is that it's not confined to powerless internet nerds. It's bled right through the industry and the universities. And why? Because it's a one-stop-shop? You mean like fucking Walmart?
silly problem but I had written a small java app to create thumbnails from images for the wife's photo website. the resizing made the thumbs look poor compared to Apple's ImageEvents. had to google an applescript to accomplish the thing. hopefully the image quality has gotten better. all I was doing was taking a 400x400 or so jpg and reducing it by 50%. nothing else. and they turned out either blurry or lost sharpness, etc. ImageEvents does the job alot better.
when I taught AP Comp Sci we did some graphics projects and yes, the 2D stuff is really cool. but I don't know whether java is ready for higher end stuff or even decent quality yet. hope it is, that'd be really nice.
My problem? I was perfectly gruntled, until some numbnuts came by and dissed me.
Java3d is all translated into OpenGL calls, which are processed in hardware just like any other OpenGL calls. Java2D also uses some hardware help. Now that Java has been open-sourced, I expect we will see some JRE releases which take even more advantage of hardware.
As a somewhat-successful professional software engineer, it has been my experience that this sort of programming is not as common as many students and/or civilians think. The majority of programming code is done on the business level... i.e. I need a report that will tell me how fribble relates to frabble, or we need a system that will track all of the incoming support requests on our jimble jamble product.
As a student I really thought I would get the opportunity to write games, but after seeing the development process at a software publisher specializing in gaming, I realized that the programmers spend more time dealing with things like physics and optimization and leave a lot up to graphics artists.
There are many reasons to use Java, but nearly all of them have to do with the language's proliferation in the business/enterprise world. Why on earth would you choose Java as a language/platform for doing anything with graphics? If you want something Java-like, and you're interested in experimentation, for god's sake go with Proce55ing, which is much better suited for graphics work, both in terms of instant-gratification and supporting library/community. If you want a modern, high-level language, why not go with Ruby? In evolutionary terms, compared to Ruby, Java is starting to look more and more like a dinosaur. And finally, if you want something that will get you extreme speed while maintaining conceptual abstraction, I'd strongly suggest looking into the weird and wacky world of OCaml.
Was that really a JPEG compression problem?
Did you try to display the thumbnails before saving them, did they look bad already?
Try using the bilinear interpolation rendering hint. A search engine should find some sample code.
Is this a commercial for the book? How many graphics libraries use web services? Serializing and deserializing a SOAP message is not fast enough! Java and C# are too slow for anything but a super computer (insert PS3 here) to render high level graphics at 60fps. Who approved this article?
My university computer science graphics course was still pretty low level. We use OpenGL for 2D drawing primitives, but the assignments were: line drawing with anti-aliasing, 3D rendering, camera movement, adding light sources, and finally ray tracing. As I said before, we only got to use 2D drawing routines to project 3D data onto a 2D surface. Many people in the class complained because they thought the course would be using OpenGL 3D. Hell, most of the undergrads referred to OpenGL like it was a single library, not realizing that OpenGL is just an API that many companies reimplement to utilize specific hardware. Painfully obvious by questions like, "Well, how does OpenGL do it?"
Seriously.. Just because you can put OpenGL bindings in a corporate fabricated language doesn't mean you should.
bash-2.04$
bash-2.04$yes "Don't you hate dialup connections?"| write USERNAME
Don't waste your time, man. Pick up a book on programming with DirectX, and use what the big boys use.
I'd love to see someone port an open source Java class libary or VM's graphics library to render the graphics on the Cell microprocessor's SPE math processors, especially in PS3/Ubuntu.
Is there an open source Java OpenGL implementation? That would be a great package to see running on the Cell.
--
make install -not war
See, this is why we still need mainframes.
In the free world the media isn't government run; the government is media run.
Everything Java does has to be done in C first. Until operating systems are written in Java, that's always going to be the case. OpenGL has been available in C for over 15 years, and by the time it was implemented in Java it wasn't a novelty anymore. Maybe there's some benefit to Java memory management in scene graphs, but all that functionality had to be written in C first before Java would run it.
Your first three points are still valid (basically the one point that you have to manually keep track of which byte variables are really unsigned). However, your attempt to add more points is pathetic. For instance, "short a = (short)65535;" works just like "byte c = (byte)255;". Furthermore, Java actually *does* have an unsigned 16-bit type. It is called "char". As in "char a = 65535; int b = a;".
Computer
.
Graphics
.
With
.
Java
But how much of the billiance of Java due to the fact that it's Java and not the way a consortium defined the API layers? The Java APIs work because they were designed by consortiums spending many years in meetings around the world to define specs. The internet enabled more collaboration with the Java specs than any language before it, but these API's have to be implemented in C.
Runescape in Java,
...C/C++?
WOW and EQ2 and EVE in
Which games look better? Based on the current crop of games, it does not look like Java has arrived as a tool for making 3d games.
I've taught introductory computer graphics courses at both Stanford and the University of California, Santa-Cruz, and by far the most important change that needs to be made to the "traditional" curriculum is the introduction of the programmable pipeline. Far more so than the chosen language or API, teaching shaders forces students to understand the mathematics that lies at the heart of the graphics pipeline while simultaneously endowing them with the tools they need to create Really Cool Projects®. The prevailing mentality seems to be that asking students to handle lighting and transformations directly in an introductory setting is too difficult, but my experience has been that this is not at all the case.
For those that are interested, I have SIGCSE paper on the subject available here.
... although I sometimes have a hard time convincing IT consultants of this -- What? You want your data in a GRAPH? Are you SERIOUS? -- Good, annotated, interactive plots can be enormously helpful to make sense of numeric data, which is what a lot of business programming is about, regardless of whether you are an investment banker or a pharmaceutical researcher.
If such features are absent from some business software, it is not because users would not find them useful; it is because many business programmers lack the skills to create them.
It is true that Java lacks a convenient plotting library in its standard, but it has a decent set of basic tools in the J2SDK, so it isn't that difficult to write a simple one. Making it interactive is a bit trickier, of course. Simple plotting libraries are of course available for download, although the few I have studied were a bit too simple.
Using script languages for such purposes sounds risky to me. Some ten years ago, when I heard that the team I was planning to visit had only Macs, I did hastily write a data conversion / plotting tool in Tcl/Tk to take with me, so that I could still access and use my data --- I didn't fancy porting a FORTRAN/C++ application from Unix to Mac OS on the spot! It worked, but it was terribly slow on anything over a thousand data points or so.
Java was much better, and it allowed me to share my data with co-workers over the internet in the form of interactive graphs; in the late 90s that was quite a novelty for us... And an object-oriented language is enormously beneficial for such purposes, in my humble opinion, because that is the right way to assemble a data graph -- as a set of data objects, annotation objects, and interactive anchors.
I still regret that MS moved away from the concept of the original MS Graph, which basically treated data sets as objects to be rendered, to the array-based model of Excel, which I find much less practical, and is riddled with inconveniences and a few significant bugs. Call me eccentric.
Do you guys actually do any programming?
Hey, I've got a great idea. Why not write an office suite in Java !!
Come back in a few years when you've had some experience.
java stinks like poop
Like this: http://product.thinkfree.com/ ??
A computer graphics course using any API (be it OpenGL, DirectX, or what-have-you) is like a data structures course that focuses solely on the STL (or your favorite language's equivalent); it has its place at a higher level but it is not a replacement for down-and-dirty, low-level study and implementation.
Many universities these days are turning out "programmers" rather than "computer scientists" -- they can get stuff done, provided the tools are available to them, but God help you if you ever ask one to create that tool themselves. Pointers scare the hell out of them, they can't read declarations with more than 1 level of indirection, even simple concepts like recursion are beyond them (I once had an interviewer tell me that most people took 15 minutes to solve the recursion interview question which took me all of 60 seconds to solve and explain, and then they were wishy-washy when he challenged their solution, even if it was correct -- they had no confidence in their solution.)
Its a sad day when a CS student goes through "Computer Graphics I" and may have never studied (and implemented) the variety of line-drawing algorithms to experience first-hand their respective code complexity and performance, or who have never experienced the joy of drawing an ellipse using a purely-incremental algorithm using second-order derivatives.
Its an even sadder day when a CS student goes through "Data Structures" and may have never implemented a self-balancing binary tree, KD-trees, red-black trees, pooled memory allocators or skip-lists.
APIs come and go, but fundamentals are forever. I pity the poor programmer who "knows Direct3D" only to have it replaced by DirectRayTracer years down the line.
Not all is lost, as there still are many great CS schools that haven't forgotten about the fundamentals, but I think there are many who have unfortunately lost their way.
I recently completed my MS in CS, will post additional materials if anyone is interested. I used genetic algorithms to alter the look of JOGL generated visuals in my thesis "Aesthetic Emergence in Synesthetic Sculptures". Here are two batches, each with a few variations:
http://youtube.com/watch?v=F1xvnI96gFA
http://youtube.com/watch?v=XPylKUSEuuc
The wires 'weave' according to evolved vector fields - the finished product will use the vector fields in addition to 3D geometry from a Point Grey stereoscopic camera to sculpt the musicians in my band, with the animation modulated by MIDI events and other items.
Music for coding. Genetic algorithm driven visuals. http://www
"But a lot of people associate game design with graphics."
Not me. Oh wait!
Yes, the assembly language that a java program is calling might be faster than the C version.
(rolls eyes)
You Java weenies just have to accept the fact Java failed because it's too slow.
Java is so Web 1.0. Web 3.0 will be Computer Graphics with JavaScript.
Well, there may be a lot of people out there who like Java, but I'm not one of them. Java is the Cobol of the 21st century, it's OK for bureaucratic applications, when you need attributes like "traceability" and "auditability", but come on, graphics?
Get serious, folks! Java is about the last language one would use for computer graphics. It lacks the raw speed of C, it lacks the quick and dirty coding pace of Python. If I worked for Mastercard or Citigroup I would use Java, of course, but not for graphics!
At least not with any conventionally-shaped VM.
When configured in useful fashion, the Cell SPUs can access at most about 128KB of memory.
Comment removed based on user account deletion
Is it just me, or does this book belong with all the other "great" Java books of 1998 ? I still have a very hard time understanding why people even bother with Java at all, but how many legitimate uses are there for Java graphics in this day and age ? They have widget toolkits that kinda sorta get the job done. I certainly don't want to see any new Java games, that's what Flash is for.
The thing is, computer graphics theory is pretty much universal. Once you learn the algorithms to draw your primitives, you can apply them just about anywhere. Does anyone need a book to draw a line in Visual Basic ? Well they're suckers if they do, because it works more or less the same way as C++, or Delphi, or even Javascript on a Canvas object. Java is in the same boat.
-Billco, Fnarg.com
The author noted database interactivity, networking abilities, etc. associated with java. However other languages possess the same abilities (if you doubt me, go read the Church-Turing thesis again). The thing that the other languages (such as for example C) have that java does not, is speed. Lots and lots and lots of speed. Java has none. No speed in java. Speeding up the computer doesn't speed up an interpreted language. Ramble on all you like about byte-code. Its still not compiled, and its still slow as hell. Java would be good for static bar charts and pie graphs, but for a 3-d animated anything-else, run like a banshee away from Java. I know the authors are trying to teach a course and show that 'see, java can do this too', and its like putting lipstick on a pig. The lipstick is shiny, but a pig is still a pig. If you are big on java, then you can use this reference to write a 10,000 line pie-graph program. You can call it call.draw-graph.start.new-graph()-scene.create-lin e()start.no-background() or something.
I recently wrote up what I (believe to) know about the topic and what I'm still missing:
s -with-java.html
http://schmidt.devlib.org/java/creating-thumbnail
It's a bit long, but I appreciate comments, preferably by mail.
I'd like to know what you had to do to improve quality. Step-wise down-scaling (always to 50%, until thumbnail size is reached), do a blur filter first, anything else?
Try Computer Engineering - it's a bit of Electrical Engineering mixed with Computer Science with that C and assembly flavor. Minty!
It's not the execution speed that makes me stay away from Java -- it's that I like C so much more. Doesn't help that I despise the absurdly long function names (IOCCC parody)
"I've spent my whole life figuring out crazy ways to do things. It'll work." -- Montgomery Scott, "Relics"
FTA:
"In the early days, such courses dealt with low level implementation details and algorithms such as converting lines to pixels, filling rectangles, view clipping and anti-aliasing"
Well sorry , but that IS (amongst other things) what computer graphics is about. If you want to learn how to write a graphics program in Java, sure, get this book, but if you want to learn how computers do graphics you NEED to learn this low level stuff as well as going down even further to the hardware level. Any serious computer science course will teach this low level detail, only toy colleges would teach you one line library calls and pretend they're actually teaching you computer graphics.
Its a bit like someone professing to teach about filesystems then not going any deeper than fopen()!
And I have an HP calculator that can't run Java neither.
....
Java is an adulterated piece of crapola, I am telling you
IANAL but write like a drunk one.