The Bresenham line algorithm is an algorithm which determines which points in an n-dimensional raster should be plotted in order to form a close approximation to a straight line between two given points. It is commonly used to draw lines on a computer screen, as it uses only integer addition, subtraction and bit shifting, all of which are very cheap operations in standard computer architectures. It is one of the earliest algorithms developed in the field of computer graphics. A minor extension to the original algorithm also deals with drawing circles.
While algorithms such as Wu's algorith...
@R.M hehe I remember how cozy it was to solve simple problems with only a handful of variables. Perhaps you are right. I made no comment about it because I am not sure enough. But think of it: If you can set the final grid coarseness , I think you can use the algo I linked above, which is too well known
I first thought that was his intention, but it wasn't. I thought it was a dupe of this one — I think Heike used the above algo or a variant of it (actually, I didn't follow the logic fully)
Pretty cool; EquationalLogic`FindCounterexample is still pretty mysterious (at least to me), but I managed to get it to do something more interesting than spit back numbers.
In[1]:= EquationalLogic`FindCounterexample[f[a, i] == a, f[a, a] == a]
Out[1]:= {{f -> ({{1, 2}, {1, 1}}[[##1]] &...
@belisarius Messy. Half of it was in a live feed on google+, which didn't work on my iPad. Not much talking. A bit about welcoming new users and some about rudeness on certain sites.
@belisarius Yeah, I'm trying to fix that. Just need to set Visible -> False before creating the notebook, but I'll have to insert that into the raw notebook expression. Not sure if it's a good idea
@Szabolcs Darn, I didn't get the ping sound. I just posted an answer which I think will be helpful. Please take a look. Also, do you want the buttons aligned only right, or right and bottom, to stay in the lower corner?
@R.M In graphic design this kind of transform is known as an "Envelope Warp" or "Envelope Distort." I was seeking to make this Q&A easier to find by searching.
Umm... not quite the same, really. Merely adding envelope won't help — see for yourself. I don't think the tag is useful... Maybe you can use the term 'envelope warp' in the body, if you feel that strongly about it
I'll get rid of envelope from the jar label question, but I actually think it should be on this one now that you direct my attention to it. What do you think?
It might be better on that, but still am a little skeptical about getting too specific with tags. Envelope by itself doesn't mean much and is not a "topic", so to say. It is also uncommon enough that a simple search for the term gives you all related answers
Even sites that have some envelope related questions (math, dsp) don't have a tag for it.
@R.M What is the reasoning behind a minimum number of questions for a tag? It seems to me that even if there are only a handful of questions the tag still serves to organize, and it doesn't really get in the way that I can see.
@R.M In that case I don't see the problem with these rare tags: if they fail to reach critical mass in that time frame the will be removed automatically.
It also increases the chances of arbitrary tagging... Every new tag is an opportunity for someone to use only that tag. If people begin browsing by tag, like we did on SO, it is easy to miss the small ones
I don't think that should be a justification for using it... I mean, do you think hedcut is a useful tag for Szabolcs' recent question? Sure it fits the question, but what purpose does it serve our site?
I think that would be taking it to the absurd extreme, but just to argue the point, suppose we did. If in three months no other hedcut questions are posted it cleans itself, but if for some odd reason there are five questions posted nobody has to go back and find this one to tag it, or have it get lost or whatever.
Of course one must draw the line somewhere but "envelope" describes a number of things I believe, including e.g. convex hulls.
Ok, I just checked and X=1 in my comment above, not 5. Also it is 6 months
I wish I could point to some of the arbitrary and over specific tags that people add and I remove them in my editing. But there is no way to search for them and I'm sure those tags don't exist anymore, so nothing to see. But yes, it used to happen a lot. Maybe a little less now that the threshold has slightly increased
@R.M In that case orphan tags with only one question are a problem. What would you suggest as a reasonable minimum? I think three questions is reasonable, if there is plausible anticipation of growth.
Well, I tend to think of tags as being for some reasonable, but not over specific grouping. In most cases, tags should stand alone, because if some chap comes by and uses that tag alone and not one of the more common tags, it should still be clear what the intent is (of course, someone will most probably fix it by then).
It's hard to keep track of tags if we get too specific... in the end, each one creates a specific tag his way. Like for example, you'd use envelope for convex hull and someone else would use convex-hull, yet you can't make them synonyms because envelope has other meanings
In any case, I'm done on this topic for now... gotta run. Do what you think is best.
In other news, temporary #3! The last 24 hours has been a crazy round of musical chairs between Szabolcs, Leonid and myself
For solving ODEs like yours for a variable number of functions, you could do something like:
dims = 3;
k = RandomInteger[{-2, 2}, {dims, dims}];
DSolve[Table[
D[f[i, x], x] == Table[f[j, x], {j, dims}].k[[i]] &&
(D[f[i, x], x] /. x ->...
@belisarius That's why I want to publish at regular intervals, and not right away. I don't want to push anyone to finish by a deadline. Instead I want to put finished post in a queue and publish on schedule. Originally I thought of starting with a one-month interval, to make sure that there will be enough posts, but people thought that's too long. 2 weeks is an absolute lower bound though---I'm not sure we'll have enough posts in the long term to keep a 2 week schedule.
@belisarius Yes, good idea. Feel free to post ideas in the meta thread even if you don't plan to write them yourself. I am hoping to do a series on making pretty pictures, like the ones Jin linked to
I'm getting married on April 4th, 2009. My future wife has agreed to let me have actual code on top of the wedding cake. Woot!
There isn't very much room, four, maybe five lines (it's only a 6" cake because the main cake is a bunch of cupcakes).
Any language is okay, Java, JavaScript, XML.
A l...
I tried to transform FESTUNGDRESDEN into MARIA.
I found a possible encoding that does not satisfy all the specified conditions, since one of the letters needs more than 10 symbols.
A "manual" procedure: As both words share only one letter (the "R") I broke up both words as follows
--------...