Graphics in APL

Graphics in APL

Post by Charles Ma » Fri, 23 Apr 2010 13:14:35


At this time what are the graphics possibilities with APL
(the IBM version or Dyalog APL)? Thank you.
 
 
 

Graphics in APL

Post by Stan Clith » Fri, 23 Apr 2010 15:14:00


Depends what you mean by graphics...

Business-style charting is pretty well covered and easy.

I haven't seen much of what I'd call "engineering graphics" (3D displays of
stress values in aircraft components and the like). Possibly because I
live too sheltered a life. At a guess, this might be fairly
straightforward using interfaces to the likes of OpenGL.

On the other hand, if you want to write one of those shoot-all-the-aliens
video games, that might be harder to achieve. But maybe somebody has.

 
 
 

Graphics in APL

Post by Ibeam200 » Fri, 23 Apr 2010 18:30:15

I would download the latest demo from IBM and have a look at their
supplied demos. The one interesting workspace was GRAPHPAK, though
depending on what you want to do, if it's business graphics, some of
the stuff from Dyalog or Causeway might be much, much easier.

There was a plot workspace on APL2000.

Something else you might wish to try are the OPENGL workspaces
developed some time ago by Alexander Kornilovsky. He does not get
into any fancy shading, but shows how to do the OpenGL basics. These
are free downloads on the Dyalog web site.

For completeness, also have a look at J.
 
 
 

Graphics in APL

Post by Morten Kro » Sat, 24 Apr 2010 16:53:04


Recent versions of Dyalog APL bundle Adrian Smith's excellent
"RainPro" graphics package plus the .NET version of this, known as
SharpPlot. SharpPlot is also marketed outside the APL community as a
charting tool for .NET applications, with some success... See
http://www.yqcomputer.com/
non-commercial copy of Dyalog APL, SharpPlot is included.

For other types of graphics, the Microsoft.Net framework gives access
to uncountable 2D and 3D graphics engines, including Windows
Presentation Foundation, which allows you to easily describe graphics
as XML text, in a format known as "XAML" (Extended Application Markup
Language). Google will show you hundreds of recipes for "XAML graphics
examples", for example:

http://www.yqcomputer.com/

Any Microsoft.Net component can be used from Dyalog APL "as if it was
a function in your workspace".
 
 
 

Graphics in APL

Post by Walt » Sat, 24 Apr 2010 22:06:52


I and a few others have experimented for several years with IBM's
Workstation APL2 and OpenGL. The first two links on the following web
page illustrate some of the things I've worked with:
http://www.yqcomputer.com/ ~wniehoff/apl/index.html.

I've experimented with several mechanisms for calling OpenGL external
functions from APL2: (1) Using CALLAPI (from 2 GUITOOLS) to render
with OpenGL into a custom control owned by AP145; (2) Using Processor
11 to render with OpenGL into a custom control owned by AP145; and (3)
using Processor 11 to render with OpenGL into a window owned by SDL.
All three of these methods work quite nicely, except Method (2), which
has problems under Vista with Nvidia GPUs. (I believe the problem is
due to a bug in Nvidia's Vista driver. The method is known to work
with AMD GPUs and Vista and with all GPUs and XP.)

I have done a limited amount of work with OpenGL 3.0 and GLSL, where
there is great potential.

I have found APL and its array-handling capabilities to be nicely
suited to the kinds of applications illustrated on my web site -- that
is, once I learned enough OpenGL to be able to use its "vertex array"
capabilities. I would be glad to share our experiences and code.
 
 
 

Graphics in APL

Post by d_doone » Sun, 25 Apr 2010 05:41:39


From an engineering application perspective, I am using the three
graphics options provided by APL2. Further, I am also using the
interface between APL2 and opengl mentioned by Walt Niehoff above.
Together, I am able to render a variety of 2D and 3D graphics entirely
via APL2 GUI. APL2 supports the generation of bitmap and metafiles
via their AP207. Ie found this feature useful for generating a
summary (e.g., MS Word doc) with text and images rendered using
APL2. I am able to provide animations and represent stresses using
colors while remaining focused on my engineering application.
 
 
 

Graphics in APL

Post by Bjn Helgas » Mon, 26 Apr 2010 01:47:01

Have any of the APls started to use GTK?
 
 
 

Graphics in APL

Post by Morten Kro » Mon, 26 Apr 2010 16:46:33

On Apr 24, 6:47m, Bjn Helgason, j-programming < XXXX@XXXXX.COM >


We're looking at projects to allow our users to (easily) build cross-
platform GUI, and to make our own development environment really
portable as well. GTK was a runner-up, but overall we currently think
that SilverLight under Windows and MoonLight "everywhere else" look
like a more attractive proposition. One advantage of SilverLight/
MoonLight is that you can build both desktop and browser (and
"hybrid") applications based on a single core technology (XAML), which
is both declarative (you can use XAML documents to describe UI) and
programmable (you can dynamically modify the UI at runtime using
objects which integrate smoothly with APL).

SilverLight is also a good partner technology for the "managed code"
native Microsoft.NET APL Interpreter that we are building. And you can
write web applications using traditional Dyalog APL on the server, and
APL# under SilverLight in the browser. In fact, it all looks VERY
exciting, especially because XAML comes with excellent, free, WYSWYG
designers which means that the burden of providing an undustrial-
strength GUI design tool as part of your APL system is gone.

Come to the BAA AGM in London on May 21st, and to APL2010 in Berlin to
see some preliminary results of this work ;-)
 
 
 

Graphics in APL

Post by Bjn Helgas » Mon, 26 Apr 2010 17:49:16


I am not sure if you can compare Silverlight and GTK.

They seem to me to be two different things.

Silverlight is an addon to browsers (primarily IE) but GTK is a
highly usable, feature rich toolkit for creating graphical user
interfaces which boasts cross platform compatibility and an easy to
use API

Problem with Silverlight is that it is not on Linux and Moonlight is
only planned and not available.
Another problem with Silverlight is lack of SVG.

So go ahead if you want with Silverlight but take another look at GTK
as well.

And I do want to come to Berlin in september.
 
 
 

Graphics in APL

Post by Morten Kro » Tue, 27 Apr 2010 04:19:36

On Apr 25, 10:49m, Bjn Helgason, j-programming < XXXX@XXXXX.COM >



SilverLight is a very new technology, and it is still missing a few
features that are in Microsofts complete "Presentation Foundation".
But I have been playing with it a little recently, and I would also
classify it as a "high usable, feature rich toolkit for creating GUI".
My experience is limited, I could be wrong: Can you point to some
features that you need and are not supported in SL 4.0?

More at http://www.yqcomputer.com/

SilverLight is already "pretty complete" in terms of features (I
haven't found a feature that I missed yet, though I have to admit I
haven't tried to build anything really fancy). The message from
Microsoft is pretty clear: They intend to build SL up to be more or
less identical to WPF.

SilverLight is definitely not restricted to IE (you can also use it
"stand-alone" and on most popular web browsers). MoonLight is
definitely available under Linux and on the Max, it is lagging a
couple of releases behind SL but version 2.0 was released last autumn:
http://www.yqcomputer.com/
also issued strong statements that they intend not to lag too far
behind SL.


I'm not sure how big a problem this is... I think that tools which
generate SVG will most certainly also be able to generate XAML soon,
if they do not do so already. I think translation is also possible.


I don't think we'll be revisiting that decision, the advantages of SL
seems to outweigh the drawbacks by a very significant margin, from our
point of view. GTK is possibly "more complete now", but it feels like
a technology which has peaked and won't be able to follow when we all
want to build cloud apps... I am convinced that SilverLight and
MoonLight are a better long term investment. The products that we are
thinking about building will probably only be "industrial strength" in
a year or two anyway, and by that time both SL and ML will have taken
further strides.

To summarize, the advantages of SL & ML (as I see it) are:

- The technologies support BOTH desktop, web and mobile applications -
on all the platforms that we think we need to be on for the next many
years
- XAML encourages a data-oriented view of UI, perfect for APL'ers :-)
- Availability of 3rd party designers for XAML
- Growing libraries of 3rd party controls built on .NET and Mono
technology
- A HUGE investment is being made on both Windows, Linux, Mac - and
the "new" mobile platforms
 
 
 

Graphics in APL

Post by WildHear » Tue, 27 Apr 2010 17:06:35

On Apr 25, 10:49m, Bjn Helgason, j-programming < XXXX@XXXXX.COM >



Miguel De Icaza would be very sad if you told him "Moonlight is only
planned and not available".
http://www.yqcomputer.com/ : "Moonlight 2
was released December 17, 2009".
Stefano
 
 
 

Graphics in APL

Post by Bjn Helgas » Tue, 27 Apr 2010 17:23:47


Most of my moonlight information is based on following wiki

http://www.yqcomputer.com/

Here it says it is planned

It also states that support will be available in the future for
Silverlight in Opera etc.

I am definitely not an expert on neither Silverlight nor Moonlight.

I am sure both are very good products.
 
 
 

Graphics in APL

Post by Bjn Helgas » Tue, 27 Apr 2010 17:29:54


Reading the page you refer to gives followig quote:

"Moonlight has several external dependencies, such as:

Gtk+ 2.0 development package
"

So yet again GTK is here behind the scenes so it can not be all bad.
 
 
 

Graphics in APL

Post by Simon Mars » Tue, 27 Apr 2010 18:56:27


Just wanted to endorse Morten's enthusiasm for the Microsoft
technologies.

I have been playing around with Windows Presentation Foundation (WPF),
which is the Windows-native GUI framework upon which Silverlight is
based. Both use XAML to allow the GUI to be designed by sophisticated
layout tools.

I think that WPF is a major opportunity for APLs like Dyalog and APLX
which support the .NET framework. WPF and XAML make it easy to write
programs which combine the best of both worlds - APL's power and
agility, and a professional-quality user interface.

Morten and I will both be talking on this subject at the BAA AGM in
London on May 21st, where I plan to show an APLX application which
uses some of the features of WPF : Vector graphics, animation, alpha-
blending, 3-D perspective drawing, etc.