From: pedro t. <ped...@ya...> - 2008-12-27 17:15:38
|
hi Arlindo, I fixed the issue with setting the initial GrADS window size via the command line. Attached are 3 files that have been modified and added (JGrads.java, gxJ.java, and ConfigInfo.java). For development purpose and to try it out, you can copy these files to your working directory where all the code are, and then javac JGrads.java gxJ.java --- On Sun, 12/21/08, Arlindo da Silva <da...@al...> wrote: From: Arlindo da Silva <da...@al...> Subject: Re: [Opengrads-devel] Proof of concept: grads 2.0.a3 100% under JVM To: ped...@ya... Cc: "Love, Mr. Gary, Contractor, Code 7542" <gar...@nr...>, "Brian Doty" <do...@co...>, ope...@li... Date: Sunday, December 21, 2008, 8:08 PM All, Weekend update: I did some work on the Java graphics and added a readline replacement. The graphics look quite descent, even nicer than X on my Mac. I am using the same trick I used for gxyat: lines are drawn with anti-aliasing, while polygon fills are not (or else you get those funny horizontal lines). I'd appreciate any feedback regarding performance compared to the C version with *your* data on *your* platform. Of course, this is Java, it is supposed to be slower. The queston is: is it usable? Thanks, Arlindo On Fri, Dec 19, 2008 at 4:59 AM, Arlindo da Silva <da...@al...> wrote: > On Thu, Dec 18, 2008 at 1:03 AM, pedro tsai <ped...@ya...> wrote: >> >> Dear Arlindo, Gary, Brian >> >> I apologized that I have been silent for many years. I went to do >> commercial software in Silicon Valley since 2000 (except for 2003, when I >> was laid-off during the last collapse of bubble, I was fortunate that I was >> able to went back to Monterey to work on weather model for a year). Now >> days, I work for IC chip design company (for cell phone chips, digital TV >> chip, etc). That, pretty much sum up the last 8-9 years. >> >> Anyway, I think I still remember the GrADS code I work on with Brian. >> Let me known if I can be of some help. > > Nice to hear from you! I have studied your code in the last couple of days > (great job, BTW) and I have been able to extract the low level gxJ class > that I needed > for adding graphics to grads v2 under the JVM. The latest is here: > http://opengrads.org/devel/grads2/grads.jar > > To run the main application: > java -jar grads.jar > For running the utilities, > java -cp grads.jar gxeps myfile.gm > It now has basic graphics with animation and double buffer; no widgets, > though. I am pretty sure there are lots of fine tuning still to be done, > since there are still many of the gxX() routines that are stubs. On my > immediate list: > - window resizing > - grads-superpack.jar including fonts, map data, etc -- all that is needed > to run grads > - command line parsing, including initial window size > - Jline (readline replacement) > - Try to build opendap (or else wait for NetCDF-4) > Anybody willing to help with the following? > - Swing based console, IDE (?) > - JNLP/web start > - Eclipse plug in? > Brian: I may need your help to implement the widget stuff. > Let me known of bugs... > Arlindo > >> >> Pedro >> >> >> >> >> --- On Wed, 12/17/08, Love, Mr. Gary, Contractor, Code 7542 >> <gar...@nr...> wrote: >> >> From: Love, Mr. Gary, Contractor, Code 7542 >> <gar...@nr...> >> Subject: RE: [Opengrads-devel] Proof of concept: grads 2.0.a3 100% under >> JVM >> To: "Arlindo da Silva" <da...@al...> >> Cc: "Brian Doty" <do...@co...>, ped...@ya... >> Date: Wednesday, December 17, 2008, 2:47 PM >> >> Arlindo, >> >> Here's Pedro's email: ped...@ya.... It's been almost 10 years >> since he wrote the Java-Grads code, I hope he remembers what he did. >> >> Good Luck, >> Gary >> ________________________________ >> From: arl...@gm... [mailto:arl...@gm...] On >> Behalf Of Arlindo da Silva >> Sent: Wednesday, December 17, 2008 7:19 AM >> To: Love, Mr. Gary, Contractor, Code 7542 >> Cc: ope...@li...; Brian Doty >> Subject: Re: [Opengrads-devel] Proof of concept: grads 2.0.a3 100% under >> JVM >> >> On Mon, Dec 15, 2008 at 4:10 PM, Love, Mr. Gary, Contractor, Code 7542 >> <gar...@nr...> wrote: >>> >>> Brian, Arlindo, >>> >>> I believe Pedro's code is at ftp://www.iges.org/grads/gaserv/ >> >> This is very helpful, I shall be able to reuse some of this code, although >> I have a much simpler problem. Does anybody know Pedro whereabouts? >> >> Arlindo >> >> >> >>> >>> Gary >>> >>> >>> -----Original Message----- >>> From: Brian Doty [mailto:do...@co...] >>> Sent: Saturday, December 13, 2008 3:29 AM >>> To: Arlindo da Silva >>> Cc: ope...@li... >>> Subject: Re: [Opengrads-devel] Proof of concept: grads 2.0.a3 100% under >>> JVM >>> >>> Hi Arlindo, this seems to have potential implications for the GDS. >>> Regarding java graphics, there are no doubt some nice libraries out >>> there these days but I have not been keeping up with that area. >>> Pedro Tsai, about 10 years ago, wrote a grads client/server setup in >>> java which included some graphics output of the grads graphics >>> primitives (this was a precursor to the GDS). I have that code around >>> somewhere and I can find it if you think it might be useful for this. >>> You don't need to support a whole lot to get most of the graphics output >>> working. >>> >>> Take a look in gxmeta.c, at function gxhdrw. It redraws the internal >>> buffer and draws all the primitives. Look at the code starting with the >>> comment "Get message type". If you support color, polygon, rectangle >>> (separate from polygon for performance), and line drawing, you get >>> almost all of the graphics. Line thickness is also nice (can easily be >>> soft generated too). >>> >>> Even though GrADS has been all X11 for a while now, it didn't start that >>> way and I have wanted to avoid being locked into that, thus this fairly >>> simple interface has survived. I don't expect to redesign this in any >>> substantial way but I do want to add text strings and font selection as >>> new primitives (with appropriate fall-back to the Hershey fonts when >>> needed). Anyone out there still using gv32? It's not going to work >>> much longer.... Brian >>> >>> On Dec 12, 2008, at 11:17 PM, Arlindo da Silva wrote: >>> >>> > All, >>> > >>> > I just refreshed >>> > >>> > http://opengrads.org/devel/grads2/grads.jar >>> > >>> > It is getting quite functional now: grib-1, grib-2, netcdf, hdf, >>> > printim. Still no readline, x11 or opendap; see output of "q config" >>> > below. This is all 100% java (no JNI), it should run anywhere. >>> > >>> > Brian: I know you are thinking about redesigning the graphical engine >>> >>> > in grads. Do you have any thoughts on how one could handle the >>> > graphics in Java? Currently, I have gxX.c stubbed out. I was thinking >>> > about implementing "gxX.c" in java around JPanel. >>> > >>> > Arlindo >>> > >>> > >>> > ga> q config >>> > Config: v2.0.a3.oga.2dev big-endian printim grib2 netcdf hdf4-sds Grid >>> >>> > Analysis and Display System (GrADS) Version 2.0.a3.oga.2dev Copyright >>> > (c) 1988-2008 by Brian Doty and the Institute for Global Environment >>> > and Society (IGES) This program is distributed WITHOUT ANY WARRANTY >>> > See file COPYRIGHT for more information. >>> > >>> > Built Sat Dec 13 00:32:59 BRST 2008 for mips-unknown-elf >>> > >>> > This version of GrADS has been configured with the following options: >>> > o Built on a BIG ENDIAN machine >>> > o Command line editing DISABLED >>> > o printim command for image output ENABLED >>> > http://www.zlib.net >>> > http://www.libpng.org/pub/png/libpng.html >>> > http://www.libgd.org/Main_Page >>> > o GRIB2 interface ENABLED >>> > http://www.ijg.org >>> > http://www.ece.uvic.ca/~mdadams/jasper >>> > http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2 >>> > g2clib-1.0.5 >>> > o NetCDF interface ENABLED >>> > http://www.unidata.ucar.edu/software/netcdf >>> > netcdf "3.6.2" of Dec 11 2008 22:17:25 $ >>> > o NCSA HDF interface ENABLED >>> > http://hdf.ncsa.uiuc.edu >>> > HDF4.2r3 >>> > o Athena Widget GUI DISABLED >>> > o OPeNDAP gridded data interface DISABLED >>> > o OPeNDAP station data interface DISABLED >>> > >>> > >>> > >>> > >>> > >>> > On Thu, Dec 11, 2008 at 12:38 AM, Arlindo da Silva >>> > <da...@al...> wrote: >>> > Hi, >>> > >>> > I was able to created a prototype build of grads v2 that runs >>> > entirely under the JVM: >>> > >>> > http://opengrads.org/devel/grads2/grads.jar >>> > >>> > To try it out: >>> > >>> > java -cp grads.jar grads >>> > >>> > Most external libraries have been disabled at this point, even X. >>> > However, you can do things like >>> > >>> > ga> open model.ctl >>> > ga> d ts >>> > ga> print ts.eps >>> > >>> > It feels quite usable on my MacPro laptop, speed-wise I mean. What do >>> > you think? Here is the best part of it: >>> > >>> > numer of grads source code lines modified: 0, except for the >>> > replacing gxX.c with the attached stubs. >>> > number of build script lines modified: 0 >>> > >>> > Jennifer: you may want to carry the gxX.c stubs along with the sources >>> >>> > code and have a --disbale-X11 during configure. This is very useful to >>> >>> > create binaries for machines that do not provide X11 (say many >>> > computer centers disable X11 at the compute nodes). >>> > >>> > Here is the tool that I used: >>> > >>> > http://nestedvm.ibex.org/ >>> > >>> > Building this gcc toolchain on Mac OS X 10.5 is kind of tricky, talk >>> > to me before attempting to do it yourself. I'll post notes about it at >>> >>> > some point. It may be simpler on Linux, but I have not tried it >>> > myself. >>> > >>> > Beware: this is rough, just a proof of concept for now; however I'd be >>> >>> > interested in hearing about problems. Soon we may be able to run grads >>> >>> > on cell phones. >>> > >>> > Arlindo >>> > >>> > >>> > -- >>> > Arlindo da Silva >>> > da...@al... >>> > >>> > >>> > >>> > -- >>> > Arlindo da Silva >>> > da...@al... >>> >>> >>> ------------------------------------------------------------------------ >>> ------ >>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, >>> Nevada. >>> The future of the web can't happen without you. Join us at MIX09 to >>> help >>> pave the way to the Next Web now. Learn more and register at >>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix. >>> com/ >>> _______________________________________________ >>> Opengrads-devel mailing list >>> Ope...@li... >>> https://lists.sourceforge.net/lists/listinfo/opengrads-devel >> >> >> >> -- >> Arlindo da Silva >> da...@al... >> > > > > -- > Arlindo da Silva > da...@al... > -- Arlindo da Silva da...@al... |