[ANN] CubeHelix and slider

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] CubeHelix and slider

abergel
Hi!

Yesterday with Damien P., we had a great discussion about modeling color palettes. Damien showed me an implementation he did about cubehelix. This is a fantastic way to model colors, while preserving the intensity. More info about it on: https://www.mrao.cam.ac.uk/~dag/CUBEHELIX/

Here is a code example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v helix shape elements slider |
v := RTView new.
helix := RTCubeHelix new.
helix rotations: 2.
helix gamma: 2.
shape := (RTBox new height: 300; width: 1; color: [ :model | helix level: model ]).
elements := shape elementsOn: (0.0 to: 1.0 by: 0.002).
v addAll: elements.
RTHorizontalLineLayout new gapSize: 0; on: elements.

"Set the gamma value"
slider := RTSlider new.
slider view: v.
slider labelled.
slider callback: [ :aValue | helix gamma: 5 * aValue. elements updateShape ].
slider moveBelow.
slider build.

"Set the rotation value"
slider := RTSlider new.
slider view: v.
slider labelled.
slider callback: [ :aValue | helix rotations: 5 * aValue. elements updateShape ].
slider moveBelow.
slider build.

v
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

And the accompanying screenshot

Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] CubeHelix and slider

philippeback
Wow, we get more and more speed and cool stuff from Roassal these days!!!

Very useful for heat maps in business!

Phil

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] CubeHelix and slider

Tudor Girba-2
This is beautiful.

The speed with which things are happening these days around Moose and Pharo is just mind boggling.

Cheers,
Doru



On Wed, Dec 17, 2014 at 12:00 AM, [hidden email] <[hidden email]> wrote:
Wow, we get more and more speed and cool stuff from Roassal these days!!!

Very useful for heat maps in business!

Phil

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] CubeHelix and slider

Sven Van Caekenberghe-2

> On 17 Dec 2014, at 08:36, Tudor Girba <[hidden email]> wrote:
>
> This is beautiful.
>
> The speed with which things are happening these days around Moose and Pharo is just mind boggling.

Yes, that is true.

I has been going fast for quite a while, but it seems to be accelerating.

> Cheers,
> Doru
>
>
>
> On Wed, Dec 17, 2014 at 12:00 AM, [hidden email] <[hidden email]> wrote:
> Wow, we get more and more speed and cool stuff from Roassal these days!!!
>
> Very useful for heat maps in business!
>
> Phil
> ​
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] CubeHelix and slider

stepharo
In reply to this post by abergel
Yes :)
And we want to have this inside Pharo as well as I hope soom better palettes.
Tx Damien for this code.
So we agree with alex that he can use it in Roassal the time that we integrate it in Pharo :)
Stef

Le 16/12/14 22:43, Alexandre Bergel a écrit :
Hi!

Yesterday with Damien P., we had a great discussion about modeling color palettes. Damien showed me an implementation he did about cubehelix. This is a fantastic way to model colors, while preserving the intensity. More info about it on: https://www.mrao.cam.ac.uk/~dag/CUBEHELIX/

Here is a code example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v helix shape elements slider |
v := RTView new.
helix := RTCubeHelix new.
helix rotations: 2.
helix gamma: 2.
shape := (RTBox new height: 300; width: 1; color: [ :model | helix level: model ]).
elements := shape elementsOn: (0.0 to: 1.0 by: 0.002).
v addAll: elements.
RTHorizontalLineLayout new gapSize: 0; on: elements.

"Set the gamma value"
slider := RTSlider new.
slider view: v.
slider labelled.
slider callback: [ :aValue | helix gamma: 5 * aValue. elements updateShape ].
slider moveBelow.
slider build.

"Set the rotation value"
slider := RTSlider new.
slider view: v.
slider labelled.
slider callback: [ :aValue | helix rotations: 5 * aValue. elements updateShape ].
slider moveBelow.
slider build.

v
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

And the accompanying screenshot

Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev