PDLPorters / PDL-Graphics-Simple

This is an interface layer to the several PDL::Graphics modules out there. It is intended to become part of the PDL core.
https://p3rl.org/PDL::Graphics::Simple
5 stars 3 forks source link

Prima driver not doing colour wedges #9

Open mohawk2 opened 1 year ago

mohawk2 commented 1 year ago

@dk Thank you for the quick and perfect support so far!

When I run the tests now, with the Prima driver the two that aim to put colour-wedges on don't do so (and the one with two bullseyes at the top don't seem to have the right gradient-shape in the bottom right either). Do you see this as well, and can you figure where the problem is?

I've just put out PDL::Graphics::Prima 0.18 on CPAN, but if necessary I'm happy to put out a new version if that's where the problem lies :-)

dk commented 1 year ago

Eeh this one is a bit tough.. the wedges are straghforward as they don't seem to be implemented at all (see Prima.pm L 319), but the option doesn't seem to reach the code where it displays the message. I could hack it so the message could be seen, but I guess a more correct way would be to implement the wedges properly instead. And here lies the problem, as I don't navigate well in the Davids set of P:G:P concepts and its relation to PDL.

The same problem is with the bottom right gradient shape - frankly I don't have a slightest clue what pdl(xvals(9,9),yvals(9,9),rvals(9,9))*20 means and how it could be visualized, and neither I have a clue about the mental model of the underlying ds::Grid , to even approach this.

I'm very open to help but I don't think I can pull this off alone in a reasonable time, sorry

mohawk2 commented 1 year ago

@dk Thank you for the rapid response! I believe I get you. I think the expression you quote there is the X coords, the Y coords, and then rvals gives an intensity decreasing from the centre, which for the top two images is correct. On the other point, the other implementations seem to show a bottom-left to top-right gradient in the bottom-right image, I don't understand why the Prima one is different.

@run4flat (or even @drzowie) Are you able to steer us a bit on this?