Linescapes Iteration 9

A different gety function:

[php lang=”JavaScript”]$(function() {
var canvas, linescape, hills;

canvas = $(“#canvas”).get(0);
linescape = new LineScape(canvas);
linescape.xres = 1;
linescape.zres = 0.5;

hills = [];
for(var i = 0; i < 100; i += 1) { hills[i] = {x:Math.random() * 1000 - 500, z: Math.random() * 2000, force:Math.random() * 2000 + 1000}; } linescape.gety = function(x, z) { var y = 600; for(var i = 0; i < 100; i += 1) { var hill = hills[i]; var dx = hill.x - x; var dz = hill.z - z; var dist = Math.sqrt(dx * dx + dz * dz); y -= Math.sin(1 / dist * 1000) * 10; } return this.ycenter + y; } linescape.draw(); });[/php] Result.

This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Linescapes Iteration 9

  1. Pear says:

    Convergence between art and technology. I get a feeling of emptiness and sadness when the image comes to live (seen the example as an artwork), I don’t now why, maybe the lines and colors blending with each other, creating some kind of deserted landscape. Well, sorry got little deep there 😉

  2. mehdadoo says:

    When will come tomorrow then?

  3. Todd says:

    oustanding series, thanks for the posts.

Leave a Reply