--- Log opened Wed Nov 25 00:00:20 2009 |
00:05 | | You're now known as TheWatcher[T-2] |
00:08 | | You're now known as TheWatcher[zZzZ] |
00:57 | | SmithKurosaki [Smith@Nightstar-6450f657.dsl.teksavvy.com] has quit [Connection closed] |
00:58 | | SmithKurosaki [Smith@Nightstar-6450f657.dsl.teksavvy.com] has joined #code |
00:59 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [Ping timeout: 121 seconds] |
01:03 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
01:03 | | Derakon[AFK] is now known as Derakon |
01:04 | | AnnoDomini [annodomini@Nightstar-8ab62e9b.adsl.tpnet.pl] has quit [[NS] Quit: I miss my automatic quote file quit script.] |
01:47 | | * Derakon eyes the script he just set to run in Blender. |
01:47 | <@Derakon> | Perhaps I should have tried it at a smaller resolution than 100x100x100 to start... |
01:57 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?] |
02:09 | <@Derakon> | <3 vim. |
02:09 | <@Derakon> | :.,.+2s/\// \/ /g |
02:14 | <@Vornicus> | replace all slashes so they have spaces around them... but I don't recognize the bit at the beginning. |
02:15 | <@Derakon> | It's a range indicator; "this and the next two lines". |
02:20 | <@Derakon> | First trial of homemade voxels in Blender: http://derakon.dyndns.org/~chriswei/temp2/sphere.png |
02:20 | <@Derakon> | Next step is to use a shell mesh instead of making it out of cubes. |
02:52 | < Pinkhair> | how efficient is it? |
02:53 | <@Derakon> | Define "efficient"? |
02:53 | < Pinkhair> | for, say, animation purposes |
02:54 | <@Derakon> | You mean like runtime? |
02:54 | <@Derakon> | It's pretty dang slow, even when I skip creating the cubes. |
02:54 | < Pinkhair> | and what s the data source? An image sequence? |
02:55 | <@Derakon> | A function. |
02:55 | <@Derakon> | In this case, "distance from origin < 1". |
02:55 | < Pinkhair> | ah, I see |
02:56 | <@Derakon> | And actually, skipping creating the cubes makes it zippy; I was accidentally running an out-of-date version of the script without the cubes commented out~ |
02:56 | < Pinkhair> | so it is basically running through the array, and creating a cube, or not, based on the function? |
02:56 | <@Derakon> | Right. |
02:57 | <@Derakon> | The goal being to swap the function out for a fractal once I get the basics working. |
02:58 | <@Derakon> | And then maybe make some images like these: http://www.skytopia.com/project/fractal/mandelbulb.html |
03:00 | < Pinkhair> | might it be faster, if not easier, to create the geometry and then delete/hide what you don't need? |
03:01 | <@Derakon> | I'm dealing with fractals here. I fully expect, once I get this working, to push it to millions of faces. No. |
03:02 | | Attilla [The.Attilla@FBC920.92E3D3.F76883.99588C] has quit [Connection reset by peer] |
03:04 | | * Pinkhair would probably tackle it as a volume shader, avoid geometry |
03:08 | <@Derakon> | How do volume shaders work? |
03:08 | <@Derakon> | Part of my goal here is to have detailed models to play with, I note. |
03:09 | < Pinkhair> | well, in lightwave it evaluates every pixel with a raymarch through a calculated volume |
03:10 | < Pinkhair> | though there are also voxel based ones |
03:12 | < Pinkhair> | http://www.geeks3d.com/20090706/volume-rendering-demo-accelerated-by-gpu/ |
03:13 | < Pinkhair> | I imagine something of the sort exists for blender |
03:15 | < Pinkhair> | but yeah, fractal volume clouds and the like, that's what they are. just a function fed into it |
03:21 | < Pinkhair> | on a related note, http://www.geeks3d.com/20090608/3d-texture-in-real-life/ |
03:22 | <@Derakon> | I've seen a display that used that principle before. |
03:31 | | * Derakon finds source code for Marching Cubes, commences porting it to Python. |
03:31 | <@Derakon> | Mostly it's just a huge table of data... |
03:32 | < Pinkhair> | yup |
04:04 | < Rhamphoryncus> | Derakon: those are awesome. If there a bit higher resolution I'd use them as a background... |
04:05 | | * Derakon nods. |
04:06 | < Rhamphoryncus> | http://www.skytopia.com/project/fractal/new/full/Power8side-q20b.jpg :D |
04:06 | < Rhamphoryncus> | eww compression artifacts |
04:07 | <@Derakon> | Yipe, they're pretty bad all right. |
04:07 | < Rhamphoryncus> | 4500x4500, but only 1.3 megs |
04:12 | <@Derakon> | Warghlargbl |
04:12 | <@Derakon> | The code I'm porting uses a three-space indent. |
04:12 | <@Derakon> | Who the hell uses three spaces? |
04:12 | <@Derakon> | :%s/ / /g |
04:13 | < Rhamphoryncus> | .. I think google does |
04:14 | <@Derakon> | In other news, I'd like to thank the genius that added support for doing things like "foo = [-1] * 12" to Python. |
04:15 | <@Vornicus> | Actually thank, or... |
04:15 | <@Derakon> | Actually thank. |
04:15 | < Rhamphoryncus> | I've been curious about 3d fractals for a while, or at least the idea of them. Specifically, I'd like to experiment with rendering using objects that can be rendered with arbitrary detail |
04:15 | < Rhamphoryncus> | why's that? |
04:15 | <@Derakon> | It comes in handy sometimes. |
04:15 | | GeekSoldier [Rob@Nightstar-e86e3e0d.ip.cablemo.net] has joined #code |
04:15 | <@Derakon> | E.g. setting up an array with default values in each cell. |
04:15 | | * Rhamphoryncus nods |
04:15 | <@Derakon> | Or repeating strings. |
04:15 | < Rhamphoryncus> | yeah |
04:16 | < Rhamphoryncus> | just creating an empty list, ie [0] * 1000.. it'd be awkward otherwise |
04:18 | <@Vornicus> | well, list comprehensions. But even that's less elegant |
04:22 | < Rhamphoryncus> | yeah |
04:23 | < Rhamphoryncus> | [0 for i in range(1000)] |
04:34 | <@Derakon> | Aww, you can't make tuples using list comprehension. |
04:34 | <@Derakon> | At least, not without calling tuple(). |
04:34 | <@Vornicus> | tuple(0 for in in range(1000)) |
04:34 | <@Derakon> | I meant you can't do e.g. foo = (round(i) for i in listOfFloats) |
04:35 | <@Derakon> | Gives you a syntax error at the "for". |
04:35 | <@Derakon> | Your syntax also doesn't work, even if you replace the first "in" with "i". |
04:40 | <@Vornicus> | It should... |
04:42 | <@Derakon> | Ahh, it's a 2.6 addition. |
04:56 | <@jerith> | (foo for foo in bar) is a generator comprehension. It returns an iterator, not a tuple. |
05:01 | <@Derakon> | Well, this seems like some amount of progress: http://derakon.dyndns.org/~chriswei/temp2/sphere2.png |
05:01 | <@Derakon> | Got some overlap. Got some holes. But it's recognizably a sphere. |
05:04 | < Alek> | hm. nice. |
05:21 | <@Derakon> | Problem is, I have no idea how to go about debugging this... |
05:22 | <@Vornicus> | Looks like you're hooking up abc abd as opposed to abc acd |
05:23 | <@Vornicus> | That should fix most of your holes, but you'll still end up with the big circular holes. |
05:23 | <@Derakon> | The big circular hole was due to trying to make a sphere of the same radius as the volume I was iterating over. |
05:24 | <@Derakon> | I agree that I seem to be getting the wrong verts; the problem is figuring out why, as the vert order is part of the code I ported to Python. |
05:24 | <@Derakon> | Presumably it worked fine in C... |
05:25 | <@Vornicus> | Well... dunno. But in both cases the triangles share two corners, so it's probably a simple little fix. |
05:25 | <@Derakon> | In the same way that the crashing bug I'm dealing with at work is probably a one-liner, huh? :p |
05:26 | <@Vornicus> | Well yes. In this case, change which pair gets shared; there's three possible shared pairs as one of the two triangles doesn't need to move. |
05:27 | <@Derakon> | For your own edification, here's the codebase I'm working with: http://local.wasp.uwa.edu.au/~pbourke/geometry/polygonise/ |
05:28 | <@Derakon> | And here's the Pythonized version: http://paste.ubuntu.com/327364/ |
05:29 | <@Derakon> | At the moment, I suspect I may have made an error in compactifying lines 364-367 in the port. |
05:32 | <@Derakon> | On the flipside, it seems like errors in that section would result in errors due to invalid vertex indices. |
05:32 | <@Derakon> | (I swapped the initial -1 value for None) |
05:34 | <@Vornicus> | Speaking of compactification: 342+ can be replaced with: for k in range(8): if grid[k][1] < isolevel: cubeindex |= 1 << k |
05:34 | <@Derakon> | Yeah. |
05:35 | <@Derakon> | I want to get this working first...I skipped that bit when I first ported through since it was short, while the bit I did compactify was much longer. |
05:35 | <@Vornicus> | ah, you have abc bcd; this is wrong. |
05:35 | <@Derakon> | Where? |
05:35 | <@Vornicus> | I think, if I'm reading it right. Unsure yet. |
05:36 | <@Vornicus> | 375-377; you're doing... shit I'm not sure what you're doing. |
05:37 | <@Derakon> | Okay, cubeindex indicates which of 8 values (the verts of a notional cube) are in and out of the volume. |
05:37 | <@Vornicus> | You're building one triangle... and then it appears you're shoving forward three steps in your tritable but I'm not entirely sure how that bit works. |
05:38 | <@Derakon> | triTable gives a list of triangles to build for each of the 256 different possible cubeindices. |
05:38 | <@Derakon> | You can have up to 5 triangles get generated for any given cubeindex. |
05:38 | <@Derakon> | So triTable uses -1 to indicate that it's out of triangles. |
05:39 | <@Derakon> | (It shoves a -1 onto the end for 16 values in the list, just to make the iteration at this point easier) |
05:39 | <@Derakon> | So this should basically read as "As long as we have triangles left, append the next triangle onto the list of triangles". |
05:39 | <@Derakon> | Except I'm generating the triangle at the same time; triTable is actually a list of indices into vertlist. |
05:40 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
05:40 | <@Vornicus> | Yergl. Something odd is going on here. You're increasing i by 3 each time, which doesn't really make all that much sense to me. |
05:41 | <@Derakon> | Let's say triTable[cubeindex] is [0, 1, 2, 3, 4, 5, -1, -1, -1, ...]. |
05:41 | <@Derakon> | So I make a triangle from the first three verts in vertlist, and another triangle from the second three verts, then I stop. |
05:41 | <@Vornicus> | Aha. |
05:41 | <@jerith> | Vornicus: He's iterating over sets of three points. |
05:42 | <@Derakon> | Yes. |
05:42 | <@Derakon> | This would be cleaner if I Pythonized it more to get rid of all the -1s and put each set of three into its own tuple. |
05:42 | <@Derakon> | But that's hard to do with vim's search/replace system~ |
05:43 | <@Vornicus> | I see. So those points technically should just tell you what... weird. |
05:44 | <@Vornicus> | Okay, so that bit I'm pretty sure is right; I guess then your error is in the 365 realm; you are not generating the vertices themselves in the right order. |
05:44 | <@Derakon> | Yeah, I think maybe I'd better try the uncompressed version. |
05:50 | <@Derakon> | Hmph. Got exactly the same result. :\ |
05:50 | <@Derakon> | Maybe I'm passing in the points in the wrong order. |
05:53 | <@Vornicus> | Likely. |
05:53 | <@Derakon> | Yeah, screwing with the order of the points definitely gives different results. |
05:56 | <@Derakon> | Yeah! |
05:57 | <@Derakon> | http://derakon.dyndns.org/~chriswei/temp2/sphere3.png |
06:00 | <@Vornicus> | Wootville. |
06:03 | | * Derakon throws a second locus in: http://derakon.dyndns.org/~chriswei/temp2/sphere4.png |
06:04 | <@Derakon> | Man, I just implemented POV-Ray style blobs. :) |
06:05 | <@Vornicus> | Now all you have to do is make the normals work right |
06:05 | <@Derakon> | Fortunately, Blender has a handy little "Recalculate normals outside" function. |
06:05 | <@Derakon> | At the moment, I suspect that my normals are simply precisely backwards, though. Easy to fix. |
06:06 | <@Derakon> | Yep. |
06:06 | <@jerith> | o/` You make my insides outsides. o/` |
06:29 | | Orthia [Orthianz@Nightstar-474b9e0e.xnet.co.nz] has quit [Ping timeout: 121 seconds] |
06:30 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
06:36 | | Orthia [Orthianz@Nightstar-474b9e0e.xnet.co.nz] has joined #code |
06:36 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has joined #code |
06:36 | | mode/#code [+qo Reiver Reiver] by ChanServ |
06:44 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
06:44 | | Orthia [Orthianz@Nightstar-474b9e0e.xnet.co.nz] has quit [Ping timeout: 121 seconds] |
06:52 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has joined #code |
06:52 | | mode/#code [+qo Reiver Reiver] by ChanServ |
06:59 | | Derakon is now known as Derakon[AFK] |
07:10 | | You're now known as TheWatcher |
07:19 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
07:22 | | Orthia [Orthianz@Nightstar-d6a6a4f3.xnet.co.nz] has joined #code |
07:34 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has joined #code |
07:34 | | mode/#code [+qo Reiver Reiver] by ChanServ |
07:53 | | Orthia [Orthianz@Nightstar-d6a6a4f3.xnet.co.nz] has quit [Ping timeout: 121 seconds] |
07:53 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
07:54 | | Orthia [Orthianz@Nightstar-d6a6a4f3.xnet.co.nz] has joined #code |
07:58 | | Orthia [Orthianz@Nightstar-d6a6a4f3.xnet.co.nz] has quit [Ping timeout: 121 seconds] |
08:01 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has joined #code |
08:01 | | mode/#code [+qo Reiver Reiver] by ChanServ |
08:04 | | You're now known as TheWatcher[afk] |
08:04 | | Orthia [Orthianz@Nightstar-d6a6a4f3.xnet.co.nz] has joined #code |
08:13 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
08:13 | | Orthia [Orthianz@Nightstar-d6a6a4f3.xnet.co.nz] has quit [Ping timeout: 121 seconds] |
08:14 | | Orthia [Orthianz@Nightstar-d6a6a4f3.xnet.co.nz] has joined #code |
08:18 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has joined #code |
08:18 | | mode/#code [+qo Reiver Reiver] by ChanServ |
08:22 | | AnnoDomini [annodomini@Nightstar-8ab62e9b.adsl.tpnet.pl] has joined #code |
08:22 | | mode/#code [+o AnnoDomini] by Reiver |
08:28 | | Vornicus is now known as Vornicus-Latens |
08:42 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
08:51 | | Reiver [reaverta@ServerAdministrator.Nightstar.Net] has joined #code |
08:51 | | mode/#code [+qo Reiver Reiver] by ChanServ |
09:53 | | You're now known as TheWatcher |
09:57 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has quit [Client exited] |
09:57 | | Tarinaky [Tarinaky@Nightstar-56faf541.adsl.virginmedia.net] has quit [Ping timeout: 121 seconds] |
09:58 | | You're now known as TheWatcher[d00m] |
10:03 | | AbuDhabi [annodomini@Nightstar-8ab62e9b.adsl.tpnet.pl] has joined #code |
10:04 | < AbuDhabi> | Crash. Damn it. |
10:04 | < AbuDhabi> | It appears drivers did not put it down. |
10:04 | | AnnoDomini [annodomini@Nightstar-8ab62e9b.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
10:11 | | Tarinaky [Tarinaky@Nightstar-01f688ba.adsl.virginmedia.net] has joined #code |
10:33 | | Tarinaky [Tarinaky@Nightstar-01f688ba.adsl.virginmedia.net] has quit [Ping timeout: 121 seconds] |
10:47 | | Tarinaky [Tarinaky@Nightstar-99cf1a59.adsl.virginmedia.net] has joined #code |
11:09 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
11:20 | | You're now known as TheWatcher |
11:30 | | Orthia is now known as Reivthia |
11:58 | | Attilla [The.Attilla@FBC920.92E3D3.F76883.99588C] has joined #code |
11:58 | | mode/#code [+o Attilla] by Reiver |
12:05 | | AnnoDomini [annodomini@Nightstar-8ab62e9b.adsl.tpnet.pl] has joined #code |
12:05 | | mode/#code [+o AnnoDomini] by Reiver |
12:07 | | AbuDhabi [annodomini@Nightstar-8ab62e9b.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
12:49 | | Tarinaky [Tarinaky@Nightstar-99cf1a59.adsl.virginmedia.net] has quit [Ping timeout: 121 seconds] |
12:59 | | AbuDhabi [annodomini@Nightstar-b1aa1ae5.adsl.tpnet.pl] has joined #code |
13:01 | | AnnoDomini [annodomini@Nightstar-8ab62e9b.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
13:03 | | Tarinaky [Tarinaky@Nightstar-a3012735.adsl.virginmedia.net] has joined #code |
13:10 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed] |
15:13 | | You're now known as TheWatcher[afk] |
15:46 | | Derakon[AFK] is now known as Derakon |
17:01 | | Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code |
17:03 | | You're now known as TheWatcher |
17:11 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
17:47 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
17:48 | | Syloqs_AFH is now known as Syloqs-AFH |
17:50 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
20:05 | <@Derakon> | Hrm...I'm confused here. |
20:06 | <@Derakon> | These 3D fractal functions map a point in 3D space to another point in 3D space. |
20:06 | <@Derakon> | How do I determine inclusion/exclusion in the set? What defines convergence/divergence? |
20:06 | <@Derakon> | Distance from the origin? |
20:49 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has quit [Client closed the connection] |
20:54 | | crem [moo@Nightstar-8ca3eea7.adsl.mgts.by] has joined #code |
21:40 | < ToxicFrog> | I think I have a greater understanding now of why I have so much trouble with IO in Haskell. |
21:40 | < ToxicFrog> | My natural instinct is to put IO at the bottom - main calls foo calls bar calls baz calls read(2). |
21:41 | < ToxicFrog> | In Haskell, however, this puts the entire program in the IO monad; it makes more sense to have main call read, then pass the result to foo. |
22:09 | | AbuDhabi [annodomini@Nightstar-b1aa1ae5.adsl.tpnet.pl] has quit [[NS] Quit: I can't think of anything remotely witty to say.] |
22:33 | <@Vornicus-Latens> | Der: the Mandelbrot set, the inside of the set is those points where you never actually leave the set. |
22:49 | <@McMartin> | TF: Well. I put IO at the bottom and main at the bottom, so. |
22:51 | <@McMartin> | But yeah, for the Project Euler stuff with IO, for isntance, I'd have a pure-functinoal routinge like e42_str, an IO-based one like e42_file that calls read and forwards the results to e42_string, and then a main that calls e42_file. |
22:54 | <@Vornicus-Latens> | That's io at the top. |
22:56 | <@McMartin> | Well, of the call stack, but not the file~ |
23:08 | < ToxicFrog> | By top/bottom here I mean call stack; location in source is irrelevant. |
23:08 | < ToxicFrog> | I assume by "main at bottom" you meant at the bottom of the source? |
23:08 | < ToxicFrog> | If not, how does that work? |
23:12 | <@McMartin> | Yeah, I meant in source. |
23:12 | <@McMartin> | main is the top of the call stack and IIRC always is of type IO :: () |
23:13 | <@McMartin> | And yeah, the sequence is read value, process value, write result. |
23:13 | <@McMartin> | Note, however, for added Wacky, that because of lazy evaluation, the reading *actually happens* inside the pure-functional part, the first time it's accessed by the computation. |
23:28 | | * Derakon eyes his computer, suspects that this approach to making 3D fractals is going to need some work. |
23:29 | <@Derakon> | It's been running for over an hour and a half now... |
23:29 | <@Derakon> | I suspect the main problem is that it's hit a process memory size of 2GB, which is how much RAM I have. |
23:30 | | * Derakon regretfully kills Blender. |
23:30 | <@Derakon> | Guess I should come up with an approach that doesn't calculate the entire volume of the fractal before starting creation of the mesh. |
23:31 | < ToxicFrog> | McMartin: yeah; the issue is that I tend to put the reads explicitly at the bottom of the stack. It makes more intuitive sense to me. |
23:34 | <@Vornicus-Latens> | Der: there's a couple of different ways you can do this; you may get good first-approximation results by inverting a couple of iterations to get an actual surface function. |
23:40 | <@Derakon> | ...I don't follow. |
23:42 | | Orthia [Orthianz@Nightstar-cb4b3359.xnet.co.nz] has joined #code |
23:42 | <@Vornicus-Latens> | http://mathworld.wolfram.com/images/eps-gif/MandelbrotLemniscates_1000.gif <--- this is the result of doing this trick for the Mandelbrot set; each successively smaller section is the result of another iteration. |
23:43 | | Reivthia [Orthianz@Nightstar-d6a6a4f3.xnet.co.nz] has quit [Ping timeout: 121 seconds] |
23:46 | <@Derakon> | That looks like they're changing the number of iterations they're doing before deciding if a point is in or out of the set. |
23:46 | <@Derakon> | I don't really see how that helps me here, though. |
23:47 | <@Derakon> | Since the big cost I'm paying is in the density of the data I'm storing and then trying to convert that data into a mesh. |
--- Log closed Thu Nov 26 00:00:35 2009 |