The Riemann Sum!
Let's talk about the Riemann Sum!!
Okay, so the Riemann Sum does the same thing that an integral does, as it is essentially measuring the area under a curve! What this means for 𝛑, is that you can measure the area (well, approximate the are) of a semicircle, multiply it by 2 to get the area of a circle, and divide by r**2, to solve for an approximate value of 𝛑!
To imagine the Riemann Sum properly, think of a semicircle, with both ends touching the x axis. Now, imagine this:
This is a good visualization of integration (or more specifically, the Riemann Sum), but what is actually going on?
Well, there are two ways to explain this: The Calculus way, or the Summation way.
First off, the Calculus method is fairly concise and easy to read, but does not really help all that much:
Cool, right? (Note from after I took that photo, the integration is not approximately the area, it is exactly the area.)
Now, the Summation way (aka the Riemann Sum) makes all this so much clearer!
(In case you do not know how to read this one, it is basically saying that, as n → ∞, it sums all of the areas of all n rectangles that fit under the curve.)
Note that, when plugged into a calculator, you can say:
Please let me know if you have any further questions!!!
Oh, also, please pardon my poor penmanship.. T ~ T I have not written English too much lately. (Lol)
@AmazingMech2418 Sorry for the really late response, I haven't been on here as much unfortunately... It is going pretty well, since I started using the IDLE Python program. I can now use multiple files, turtle, AND properly use the sprite converter you made! I've started work on the most important parts though, including:
- Type effectiveness system
- Proper damage calculation
- Bag system (I have just barely started this, though.)
- Turn system for battle, and status effects that affect the
Got any ideas on ways I could do these easily? Thanks ^ ^*
@AmazingMech2418 Okay, so:
- In Pokemon, each different pokemon has one or two types (so
Grass, Fire, Water, etc). Some types are super effective
against others, and vice versa.
- All this means is a way to calculate how much damage a move
would do to the enemy, that is accurate.
- The bag is just the player's inventory.
- I mean a turn-based fighting style like there is in Pokemon.
There are some status effects that affect the order in which
the pokemon make their moves.
So sorry, does this help at all? o~o
@LizFoster Well, for the type effectiveness part, you could probably just use a list or dictionary with values for the effectiveness and use those values to determine the damage per attack (or whatever is needed in Pokemon. I'm not really sure).
For the "bag" or inventory, you should be able to do a dictionary with all of the different items and their quantities and, when an object is picked up, increase the quantity by 1, and when an object is used/discarded, decrease it by 1. If there is a finite size, you could do that you can't pick up an object if the sum of all of the quantities is greater than a certain value, or the sum of the products of the quantities and a separate variable to determine the amount of space it would take up.
Then, for the turn-based fighting system, I'm still not completely sure what you need help with (the AI, the player, the overall UI?).
I hope this helps!
@AmazingMech2418 Hm, good idea. THe only problem now is, how am I supposed to find what every trainer's pokemon are? I don't have a copy of the games, so this might prove a bit more challenging than the more simple stuff, such as trainer AI, or a list of all of the items (and their functions).. T~T
@AmazingMech2418 That could make for a rather interesting game, actually! (Lol) Although, another tactic comes to mind. I could watch a few play-throughs of the game, as well as look through the Pokemon wikis. Those might help for the major trainers, and for the minor ones, I could probably just randomize them based on the surrounding available pokemon...?
Wow, very interesting!
The summation formula It kinda looks like the distance formula.
I love the tutorial! Expect I didn't understand a thing... I'm trying to learn higher levels of calculus (like integrals and all that), and I even have a book on it, but... eh, I don't wanna do Math lol
@DynamicSquid Since my school has yet to teach me, I had to learn it on my own time. T~T
I first really discovered and enjoyed the idea of calculus and integrals and all that stuff when I came across the graph of the equation e^x. It fascinated me that the area under any given x of this equation, is the equation!
I learned the bulk of it through video explanations and through the ever-helpful Mathematics Stack Exchange. If you'd like, I can supply you with some handy channels on YouTube for understanding the basics. ^__ ^
(Although, odds are, you probably know Calculus already _ _)
no BASIC (Beginner's All-purpose Symbolic Instruction Code) https://repl.it/languages/basic its new to repl https://repl.it/talk/announcements/Announcing-Basic-Language-With-Graphics-Beta/31741 @LizFoster
The 𝛑 master back at it again with a better than ever project!
(Your pretty much the only 𝛑 coder I know in repl)
i can see that after your first pi approximation, you were still hungry ;)
It's not that your penmanship is bad, but might I recommend having everything that is in the images also typed out below them? Maybe for people who can't load images, screen readers, or people who need to Google Translate the writings?
Also, do you ever think that this 𝛑 thing has become an obsession? Considering the amount of time dedicated and sleep lost to calculate an already (relatively) known number?
@Warhawk947 Ha ha ha ha! If it is at all interesting to you, you should watch 3Blue1Brown's
Essence of Calculus
series, or Don't Memorise's
series, which I am finishing at the moment!
Your Riemann Sum is RIGHT! (hopefully, you get the joke) Also, I would recommend putting in here the formula(s) for the Riemann Sum as shown in this screenshot from Khan Academy just to teach Riemann Sums in general instead of just for approximating pi. (I'm not sure how to use LaTeX in a Repl.it comment...)
By the way, the screenshot is from https://www.khanacademy.org/math/ap-calculus-ab/ab-integration-new/ab-6-3/a/riemann-sums-with-summation-notation.