Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Sample SurfacePlotter program
// Quick demo of SurfacePlotter [ http://code.google.com/p/surfaceplotter ]
import scala.swing._
import net.ericaro.surfaceplotter.{ProgressiveSurfaceModel, JSurfacePanel, Mapper}
val model = new ProgressiveSurfaceModel
val surfacePanel = new JSurfacePanel
surfacePanel.setModel(model)
model.setMapper(new Mapper {
def f1(x:Float, y:Float) = {
val r = x*x + y*y
if (r == 0 ) 1f else (Math.sin(r)/r).toFloat
}
def f2(x:Float, y:Float) = {
(Math.sin(x*y)).toFloat
}
})
model.plot.execute
new MainFrame {
contents = new Component {
override lazy val peer = surfacePanel
}
visible = true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.