Log In  

Just wait a bit until the demo toggles the morphing to all objects.

Cart #threeddots2-1 | 2019-06-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7

P#65328 2019-06-21 17:07 ( Edited 2019-06-21 17:08)

Neat!

Note: you can add a cheap z-buffer by checking screen pixel color before drawing the next. That makes the objects a bit more solid imho.

  local c=5
  if z > 0.33 then
    c=7
  elseif z > -0.33 then
    c=6
  end
  -- 3d point calc
  ...
  -- zbuffer!
  if pget(sx,sy)<c then
   pset(sx, sy, c)
  end

Question: what is the purpose of the quicksort? It is not used to order the points, then what?

P#65338 2019-06-22 06:01 ( Edited 2019-06-22 06:02)

Good comment regarding z-buffer.
The QuickSort is used for not morphing random points but to make the morphing more sensible. So that dots with a similar x, y are morphed.

P#65537 2019-07-03 12:55

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 08:12:53 | 0.010s | Q:19