« first day (697 days earlier)      last day (2538 days later) » 

3:13 PM
I'm going to start posting screenshots of code instead of text as answers to anyone who uses screenshots in their question. I think it's only fair.
10
 
3:41 PM
@AndrasDeak Thanks for your feedback. What do you mean exactly about the figure resembling white noise? I understand you mean zooming into certain specific regions, yes? In that case, think it's enough if the figures in the three test cases are correct (up to floating point errors), because that virtually assures all others will be correct too. Do you agree?
 
4:01 PM
No, I mean people can do a shitty job to spare bytes. This will affect the plot. What if it's fullHD? What if it's 400x200 pixels? What if it's imprecise?
At one point crappy submissions should be disqualified
@Luis ^
 
4:21 PM
@AndrasDeak So, producing wrong results to save bytes? Like for example using a different set X of initial values that's cheaper to generate, or using a different map?
 
Perhaps not that blatant. I have to reread the specs; my impressioncwas that you're giving a lot of freedom with how the figure should be generated
 
I'm specifying the procedure, but of course there's freedom to use any other (like the inevitable Mathematica builtin). To be valid, any other procedure should produce the same result as the one I described in the challenge. That should be enough spec? (The format is of course free, even a list of RGB values)
 
Oh shit, I skipped part of your post :S
Now I can see that the mesh and everything is given
Sorry, thanks, removed my comment:)
 
 
4 hours later…
8:15 PM
-3
Q: Why do matlab arrays use round brackets(rather than square brackets) for calling an element?

LevesteOne of my college courses has us use matlab and the thing that always gets me is that to get an array element, I have to use array(i) rather than array[i] and I want to know why.

I struggle to understand why anyone thinks this question is worth asking.
 
Why do square brackets [ always have to be closed with curlybrace/parenthesis}(?
 
9:11 PM
@AndrasDeak That's what I get for writing such walls of text :-P
But really, thanks for your interest and your help!
 
that's right, completely not my fault ;)
 
:-D
@codeaviator @gnovice Hey, great question and answer!
 
9:35 PM
I mean this one
 
10:24 PM
import numpy as np
import matplotlib.pyplot as plt
N = 1000
r1 = 2.4
r2 = 4
s = .001;
r = np.reshape(np.arange(r1, r2, s), (-1,1))
x = np.reshape(np.arange(.01,.99,.01), (1,-1))
for k in range(N):
    x = r*x*(1-x)
plt.plot(r, x, marker  = '.', markersize = .3, linestyle = '')
plt.axis([r1, r2, 0, 1])
@Andras ^ My first non-trivial Python program!
Actually more Numpy than Python :-)
^ Pyhton why U no grafic antiialiasing??
It took me a few seconds coming to terms with the fact that transpose on a 1-D array does nothing. But actually it's quite logical; Python has not concept of implicit trailing singleton dimensions.
 
10:45 PM
it has a concept of implicit leading singleton dimensions, but it also has a concept of pure 1d arrays :)
I wonder if x[:] = r*x*(1-x) is any faster, reusing the same memory. Probably not, because an intermediate array is created (it might help a bit with memory fragmentation, dunno)
nevermind, the shape of x changes in the first step
also, you probably want to use 1.0 in the upper bound of the range for x
 
11:16 PM
plt.plot(r, x, marker='.', markersize=1, linestyle='', color='k', markeredgecolor='none')
plt.savefig('outfile.png',dpi=600)
@LuisMendo ^
the key is the dpi setting when saving to raster
Alternatively, save to .pdf with no dpi setting and it will be fancy AF (if you can bear to wait until your pdf viewer renders it)
 

« first day (697 days earlier)      last day (2538 days later) »