Scientific computing with D

Bill Baxter wbaxter at gmail.com
Fri Jan 30 15:04:05 PST 2009


On Sat, Jan 31, 2009 at 7:32 AM, Chad J
<gamerchad at __spam.is.bad__gmail.com> wrote:
> Don wrote:
>> Bill Baxter wrote:
>>>
>>> But fixed, compiled stuff, D is certainly the biz.  I really wish
>>> there were a good plotting package for D.  That would eliminate about
>>> half of my trips over to Python-land, which are just to get a quick
>>> peek at what the data generated in my D program looks like.
>>
>> I agree. I imagine that even something faily basic which could just
>> write to a png file, or pop up an OpenGL window (ie, not publication
>> quality), would cover a big chunk of the use cases.
>
> Consider generating an svg image.  The potentially infinite granularity
> is nice and it may also allow you to offload the rendering work to
> something else.  All you have to do is describe where some lines,
> numbers, and points need to go, while you can safely ignore working with
> pixels, anti-aliasing, drawing lines, drawing circles, drawing dotted
> lines, etc etc.
>
> As it's somewhat related, I'll mention that I'm working on a library in
> D that renders svg images using OpenGL.  It can currently trace lines,
> rectangles, and circles, and more or less understands svg's nesting
> hierarchy and mathematical transformations.  I'll try to finish off all
> of the filling, blending, stroking, and such things this Spring quarter.
>  The license will be something liberal (zlib/freebsd/etc).

Nice.  I wrote something to do the opposite :-)  To go from OpenGL to
an SVG file.
Actually I just cobbled together a couple of existing projects OGLE
(non-intrusive OpenGL32.dll replacement that can output jpegs and
wavefront .objs ) and gl2ps (intrusive API for outputing GL to
PS/SVG/etc) -- resulting in a non-intrusive solution for capturing GL
output to an SVG.   Been using that heavily to make figures for papers
lately.

I haven't actually made the code available anywhere... should do that
eventually.

Back to your project, how are you handling A) filled polygons
(gluTess?)   B) antialiasing?

Some day I'd love to try to port AGG to D.  I bet its possible to make
some really slick and elegant improvements to AGG given D's templates.

--bb



More information about the Digitalmars-d mailing list