So, I have a secret project that no one else knows about and is just in an ideas phase atm. I have a problem, though. I need to be able to rotate a "room" tilemap. 16x16 of 4x4px sprites, to be precise. This means that I want, after a trigger, for the tilemap to rotate all the tiles and also rotate the actual tilemap so the former "top" becomes one of the "sides"
I know to access a tile "normally," you do this:
For(x,0,15) For(y,0,15) {(y*16)+x+Map}->Var other stuffs... End End
It's a nice idea, but some of it isn't all that clear to me. The first sentence, for example, made absolutely no sense to me until i looked at the following explanation. What is a dependent/independent variable? And what is a piecewise function? Just a function divided up depending on what value x has? Thinking about it more your example makes sense now, though you say that f(x) = 0 when x = 0, i think that should be f(x) = 1. Also, you wrote "closer ans closer".
The rest is pretty straightforward to me.
Like AssemblyBandit, i'm well out of high school. I took AP Calc in high school but have long since forgotten it all. I'll keep reading on as calculus and physics were always really interesting to me, i just never stuck with them after dropping out of high school and it's all vanished.
Thanks for putting the lessons together, pimathbrainiac!
The "ans" and the f(x) = 0 were typos... changed to "and" and "f(x) = 1"
Thanks for that. As for piecewise, it is taught in Algebra I, so that is probably something you forgot. Your guess as to what it is is correct, though.
EDIT: It is notated incorrectly, though, as I don't have a tool to make the equations be images and that was the best I could do with the resources I have.
So I realized something: A lot of us Omni members in the US are sophomores in HS or younger, which means that a lot of us US high school members have no calculus experience (excluding Legimet, myself, and probably one or two other people that I forgot about). Since I think it is a very interesting subject, I'm going to make a "Complete N00bs Guide to Calculus I" (aka AP Calc AB) and post all the lessons and stuffs here.
So, without further ado: the first lesson.
Spoiler For Lesson I:
Lesson I: Limits Part I Prerequisites: Algebra I
Let's start by defining a limit: A limit is what a dependent variable (of a function) (f(x)) approaches as an independent variable (x) approaches n, where n is a constant so long as it is the same number from the positive and negative side (not entirely correct, but it will work for the purposes of this lesson). Or, in other words: "the limit of f(x) as x approaches n is [answer]" So you can say that the "limit of x2 as x approaches 2 is 4"
Or, in proper notation (-> is an arrow) lim(x->2) x2 = 4
Is this the same thing as plugging x in and solving? No, well, not exactly A limit is what x approaches, not what x is.
Take the piece-wise function f(x) = {x2 if x !=0 | 1 if x=0} lim(x->0) {x2 if x !=0 | 1 if x=0} = 0
Why? Because even though f(x) is 1 when x = 0, as x gets closer and closer to 0, f(x) gets closer and closer to 0.
Pretty cool, right?
So how do I solve a limit? Ready? You simplify the equation as much as possible, cancelling out anything and everything, then you plug in n for x.
So what if you have a function where "f(x) = 1/x", so that the number as x approaches 0 is different coming from the positive side than coming from the negative side? That's where one-sided limits come into play. One-sided limits are the same as normal limits, but they are specifically as x->n from either the positive side or the negative side. A normal limit is when the two one-sided limits are the same. one-sided limits are denoted as follows:
lim(x->0)+ f(x) if being approached from the positive (right) side, and lim(x->0)- f(x) if being approached from the negative (left) side.
so
lim(x->0)+ 1/x = infinity and lim(x->0)- 1/x = negative infinity
These are useful with holes and other things you find in graphical algebra.
So how do I solve a one-sided limit?
The best way, as I have found, is to look at the graph and see if has an asymptote. If it is, is it going towards infinity, or negative infinity? There's your answer. If there is a jump discontinuity, you have to get an x value as close as you can to n from the correct side, and estimate based on that.
In the next lesson: Limits II: Derivatives by Limits
Spoiler For Lesson II:
Lesson II: Derivatives by Limits Prerequisites: Algebra I and Lessons I
So we now understand what a limit is, right? Why are they so important? Because (at least for now) they help you find derivatives.
First, we must understand what a derivative is. A derivative is simply a rate of change, or a change in one variable divided by a change in another. This is the same as slope, kind of.
Slope is defined as the change in f(x) in relation to change in x. This can be denoted as , where means change in [variable].
is also denoted as is denoted as because it is arbitrary in many cases. X is arbitrary as well.
So, slope is the rate of change where X and are arbitrary.
A derivative is a slope at a point. what is , then? 0, right? But that can't happen because we can't devide by 0. That's where limits come into play.
Oh, I get it! It must be , right?
Exactly! In other words,
So how do I use this?
Take the function f(x)=x2
simplifies to
and then to
and then
and then we plug in "0" for
= 2x
We can then plug in the "x" coordinate of the point of which we want the derivative!
There you have it! That's the derivative of x2
Derivatives are denoted as follows:
where means the derivative of y with respect to x and f(x) is the function.
That is all I have to teach you in this lesson! Here are a few practice problems!
I know kids who are only interested in getting pokemon on their calculator. They're kids who don't care about school or anything like that. Those people come to these sites, download, and leave.
BUT
There are the people who come to the site for different reasons. They are the ones who make awesome projects. They are the ones who came because they want to make cool stuff. They are also the ones taking advanced classes and who are doing great things outside of calculators. THOSE are the members of Omni, not the "I wantz teh minecrafts on teh calcz" kids.
So, I've been monitoring this thread for a while, and I'd like to say this:
Jens: You rock. Making a 2D minecraft is no small task, and making a great 2D minecraft is, in fact, a rather large and daunting task. You did it though, and it is amazing. This is one of the many reasons I want an Nspire. Thank you.