1,150 Forum Posts by "polym"
Hypocrites much? I suggested AJAX and then apparently after calling me an idiot, you turn around and suggest AJAX again.
The irony is that the program could run forever, theoretically. Different runs of the program results in radically different timings (sometimes it does it quickly, sometimes it takes a while.) The alphabet used also affects the runtime. For example, mine is simply the lowercase alphabet with a space. If you lower the alphabet, the runtime would shrink tremendously because it has less choices to go through. However, because it's a computer program, there are certain factors that could be 'biased' (the random number generator used, the words/alphabet, the program itself, the computer hardware...)
Anyway the shit is still going.
You've all heard the famous 'monkeys with typewriter' thought experiment where it is discussed whether or not a certain amount of monkeys bashing away at typewriters for all of time could recreate Hamlet. But it becomes more practical when talking about programs that generate random documents. I wrote a simple program that doesn't take any complex math or mechanics into account for fun.
So far, my program takes 1 second to get 'ash' right, and 22 seconds to get 'ashl' right (I want to spell ashlee.) However, for ashle, it's STILL running. I'm wondering how long it would take for the program to randomly generate someone's username?
Lol never heard of AJAX? Most frameworks will have wrappers around AJAX making it very easy for you. And then integrating it with PHP or whatever is seamless.
Obviously if you don't know what nothing does, chances are it was bugging up the code.
Firefox allows you to configure what certain scripts can do (such as focusing.) That means it's firefox's setting.
Elfen Lied, Axis Powers Heltalia...Golden Boy...
Im confused? You said my idea is dumb and now want to collab with me? I dont know if you are being sarcastic or changed your mind. Either way thats a pretty cool polar graph. Is that representing digits of PI or the value of PI? Also I wont be able to run with this idea yet because Im finishing up my lastest game still.
See you don't really understand the concept, do you?
A graph plots all the points..correct? Well the formula used for the above graph is Math.cos(Math.PI * currentAngle). That's it, nothing complex. Basically every increment of the angle gets multiplied by pi. It would really look like:
R = Cos(PI * t)
X = r * Cos(t)
Y = r * Sin(t)
The reason why is because it's in polar form, not in rectangular form. in Rectangular form, there would be no R.
At 2 hours ago, swishcheese wrote:
If you let me become your collaborator, I'd be a happy man.
I just did it on a web page.
document.observe("dom:loaded", function() {
for (var i = 0; i < 360; i += 0.01)
{
var t = i;
var radius = 800;
var baseOffset = 800;
//var x = 16 * Math.pow(Math.sin(t), 3);
//var y = 13 * Math.cos(t) - 5 * Math.cos(2 * t) - 2 * Math.cos(3 * t) - Math.cos(4 * t);
var r = Math.cos(Math.PI * t);
var x = r * Math.cos(t);
var y = r * Math.sin(t);
var s = new Element('span').update("3.14");
s.setStyle({ top: baseOffset + x * radius + "px",
left: baseOffset + y * radius + "px"});
$("content").insert(s);
}
});
Generating PI in runtime? Sounds completely dumb to me. For one, there are many facilities that already have a notion of PI without the need of the developer to generate it himself. What's it called..something like, oh I don't know, Math.PI?
I wrote a program that graphs different types of polar graphs, notably one that multiplies PI by the argument. But I didn't have to write out the digits of PI or calculate it. What you need to do is something similar. Modify PI so that your game will take advantage of the digits instead of manually calculating it like a dumbass.
An example would be dividing it, or using math to get different decimal places of PI (you can even just try rounding it...)
Even then, there's only 9 digits. So I don't get what's so interesting about PI, unless you're talking about a graph anyway (and the graph repeats itself.)
So really, your idea sounds dumb as hell.
At 9 hours ago, NinoGrounds wrote:At 8 minutes ago, polym wrote: If anyone would like to see or know more, just ask!Why not
Got a specific question?
Hey guys, I've managed to do something really cool.
You know polar graphs, where you have an equation of the form r = some function (ie, r = sin(theta))? And how XNA uses cartesian coordinates? I spent a good chunk of my weekend trying to find out how to graph a rose curve, because the equations given are not so obvious to use. Then I found a small snippet of code that made me realize how easy it was. All I had to do was put the function in a variable R, and multiply it by the X and Y components (cos and sin) to get my graph.
For example, a rose curve is simply:
r = Cos(a * t)
x = r * Cos(t)
y = r * Sin(t)
This has enabled me to insert some complex equations to graph really awesome shit.
Here's a snippet of the code:
for (float i = 0; i < n; i++)
{
radius = (n - i) * 1000;
for (double j = 0.0; j < 360.0; j += 0.001)
{
float r;
float x;
float y;
/*r = 1f * (
(float)Math.Pow(Math.E, Math.Cos(j))
- 2 * (float)Math.Cos(4.0 * j)
+ ((float)Math.Pow(Math.Sin(j / 12.0), 5))
);*/
r = (float)(Math.Cos(Math.PI * j));
x = r * (float)Math.Cos(j);
y = r * (float)Math.Sin(j);
//x = (8 + 5) * (float)Math.Cos(j) - 5 * (float)Math.Cos((8.0 / 5.0 + 1.0) * j);
//y = (8 + 5) * (float)Math.Sin(j) - 5 * (float)Math.Sin((8.0 / 5.0 + 1.0) * j);
//x = 11 * (float)Math.Cos(j) - 6 * (float)Math.Cos(11.0 / 6.0 * j);
//y = 11 * (float)Math.Sin(j) - 6 * (float)Math.Sin(11.0 / 6.0 * j);
//x = 16 * (float)Math.Pow(Math.Sin(j), 3.0);
//y = 13 * (float)Math.Cos(j) - 5 * (float)Math.Cos(2.0 * j) - 2 * (float)Math.Cos(3.0 * j) - (float)Math.Cos(4.0 * j);
if ((basePos + new Vector2(x, y) * radius).X > 0
&& (basePos + new Vector2(x, y) * radius).X < GraphicsDevice.Viewport.Width
&& (basePos + new Vector2(x, y) * radius).Y > 0
&& (basePos + new Vector2(x, y) * radius).Y < GraphicsDevice.Viewport.Height)
{
pixels.Add(new Pixel(basePos + new Vector2(x, y) * radius));
}
}
}
If anyone would like to see or know more, just ask!
Remove the astericks.
At 4 days ago, incertia wrote:
I'm a C# and XNA programmer. That means I have experience in directX, but not much in directX with C++. Although I have done C++ programming for quite a long time. I dabbled in the windows API but I dropped it because I always thought that it was a waste of time doing everything manually. In fact the only 'game' I've ever made with C++ was in SDL and OpenGL. I've attempted to do a directX game in C++, but as per usual, I just stuck to XNA since most of the technical code is hidden from you.
At 1/27/12 09:16 PM, RydiaLockheart wrote: I went to school with a girl unfortunate enough to have the last name Butts. I imagine she wanted to get married and change her name.
Clever move on the parents part. Also, convenient for any 20 year old college guy who likes knocking up high school girls.
Why do people always jump into multiplayer right away? It's the hardest thing you can do (because of how sloppy and hard to test it is) and if you don't already have a good game going, networking won't be easy to integrate.
At 1/7/12 03:33 AM, yurgenburgen wrote:At 1/7/12 03:28 AM, HollowedPumkinz wrote:>can't think of excuse not to call sister's boyfriend outalso, not like I need to justify myself but, I refrain from calling him out once more because of my sister.
>blame sister
What evidence does he have, amirite?
The only thing hot are girls on NG
The females only post in threads that further their own social standing on newgrounds. You never see them one-off threads. Go figure.
The word 'troll' and 'fail' are both what I call 'metafails'. Just using them is a fail.
People who made serious answers = naive hippocrates.
At 12/14/11 08:36 PM, ZiggyZack99 wrote:
I think the irony is that attributing Python as a 'beginner's' language is by people who already have programming experience. Pascal is a 'beginner's' language used in many low level comp. sci. classes and then they jump straight to C++. You have your hipsters in college who learn Java, but many hobbyists who have done it for years will just do about every popular language there is. That's the nature of curiosity.
I think that if the attitude is to teach python first because it's a beginner's language, they will learn nothing. All the caveats and gotchas that are involved in programming (which is a lot more than just learning syntax) will not become clear. In C++, it will become clear as they struggle with the language. In Python, you are programming with a fixed mindset because many of the practical functions and libraries require a more strict mindset that is hard to enforce on a beginner programmer. On the other hand, in C++, a beginner can know to include a certain header file that does what he wants to do.
Why don't you set the directory root to /uploads? Or redirect it using a php script? And then the .htacess could be done from the root

