annotate scraps/plot.yeti @ 254:5eb57c649de0 sparse

Using hashes is simpler, but turns out to be mostly no faster and sometimes much slower. Not one to merge back.
author Chris Cannam
date Tue, 21 May 2013 17:40:33 +0100
parents 8f6c2f87dc35
children
rev   line source
Chris@108 1 module scraps.plot;
Chris@108 2
Chris@107 3 import org.jzy3d.chart: Chart;
Chris@108 4 import org.jzy3d.plot3d.rendering.canvas: Quality;
Chris@107 5 import org.jzy3d.maths: Coord3d;
Chris@107 6 import org.jzy3d.plot3d.primitives: MultiColorScatter;
Chris@107 7 import org.jzy3d.colors.colormaps: ColorMapRainbow;
Chris@107 8 import org.jzy3d.colors: ColorMapper;
Chris@108 9 import org.jzy3d.colors: Color;
Chris@108 10 import org.jzy3d.chart: ChartLauncher;
Chris@108 11
Chris@108 12 points = new Coord3d[1000];
Chris@108 13 r () = Math#random() - 0.5; for [0..999] do i: points[i] := new Coord3d(r(),r(),r()) done;
Chris@107 14 m = new MultiColorScatter(points, new ColorMapper(new ColorMapRainbow (), -0.5, 0.5));
Chris@108 15 c = new Chart(Quality#Advanced);
Chris@107 16 c#getAxeLayout()#setMainColor(Color#WHITE);
Chris@107 17 c#getView()#setBackgroundColor(Color#BLACK);
Chris@107 18 c#getScene()#add(m);
Chris@107 19 ChartLauncher#openChart(c);