### Author Topic: "With programming, you can do anything!" But not with qb64?  (Read 964 times)

#### DSMan195276

• Hero Member
• Posts: 1978
• Yes
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #15 on: September 26, 2011, 07:52:02 PM »
I'm not amazing at math, though I'll take a stab at this problem (And more then likely get nowhere).

But, a fun answer I thought of:

If we bend the rules of what you said just a bit, an answer is quite simple

Assuming that because you said the pan is x% bigger then half A the area of the pan will never be small then half A, you can cut a donut-shaped hole out of the middle of the pizza. Since it's area is half A (To be half the pizza), it's guarantied to fit on the pan (Assuming the pan is at least half A or bigger, like I said before). Technically a donut-shaped hole is a 'straight-cut' Like I said before, I'm bending the rules a bit.

Onto my real idea:

As for the actual math involved, I'm not entirely sure where to begin. But, any pan bigger then half A will only require 2 straight cuts into 4 pieces. (Cook each piece separate). And with pans to small to fit the 4th pieces, it would require more then just cutting the piece length-wise again. The Radius is probably longer the width of one of the pieces, and with that in mind that means it would require cutting the pieces width-wize so that they're smaller instead of cutting them length-wize. That also means the cutting the pieces into a indefinite number of slices won't work, since the slices will be to long to fit on the pan in some cases.

And that's all I got xD

Matt

"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

#### Mrwhy

• Hero Member
• Posts: 2890
• My Dad called me Mr Why when I was 5.
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #16 on: September 26, 2011, 08:09:56 PM »
The whole idea is to have fun and hope to discover interesting things

Yes if we allow Donut-shaped cuts it is "a whole new interesting ball game" - as our Yankee friends say.

"As for the actual math involved, I'm not entirely sure where to begin."
Yes, Matt, you are dead right. Maths is useless at telling us either "Where to start" or "How to Think".
And in this case sulks in the corner saying "But I can't start because you have not given me a DIAGRAM"  (Yet give him a diagram which "maths idiot" says is "wrong" and maths will prove that all angles are rt angles and all triangles have 2 sides equal.)

So I am afraid it is up to us!

And. sorry, multiple-cookings is not allowed.

My hunch is that the pan size will be about minimum whan the extremities of the cut laid-out-pizza pieces form an equillateral triangle.
This is NOT when we use ONE cut (get tqo quarter-pizza pieces)
Try it and see for yourself

#### vrensul

• Sr. Member
• Posts: 320
• 44th Degree Digital Wizard of the HighBytes Order
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #17 on: September 26, 2011, 09:28:15 PM »
Ya I thought you were trying a stab at me lol.  Ok no offense taken then.  Anyhow..  All this stuff about the pan and the pizza and the cuts just make me hungry.  I'm going to attempt to solve this with my complete and total lack of superior mathematical aptitude.

I imagine that if you wanted the pizza in a pan shaped different than it's current circumference then cutting it in half only makes it seem like there is a problem in the first place.  Really there isn't a problem at all.  All you need to make new "slices" and spread them around in the circle so that they cook just as evenly as the original full circle (ahem, pizza) would.  Your spacing would be the original total outside measurement (circumference) / the outside arc of each piece.  So if your Circum was 100, and each piece was an Arc of 10 and you only had half (50) then you would need to space them by 2.  Did I win?    I bet Pi is in there some where and I lost because of the stupid pi, even though it's a pizza.
' With programming, you  can do anything!
DEF SEG = &HBANKACNT 'weekend starts here...
poke checking, 1000000
DEF SEG ' quit job here.

#### Mrwhy

• Hero Member
• Posts: 2890
• My Dad called me Mr Why when I was 5.
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #18 on: September 27, 2011, 01:32:21 AM »
Quote from: Cyperium on September 26, 2011, 05:29:31 PM
Now, I don't know if you misphrased the question but if the pan is x% bigger than half the slice, then it would fit without cutting anything (even if it is 0% bigger and thus equal the size of the pan).

Wait...sorry, it's the area that is compared, thus the diameter won't fit into the pan...right.

The pan is x% bigger than half the area of the pizza (thus I take it you mean the area of the pan).

This is just a guess, cause I'm not that good at math, but let's say this equation would work though, because we need equal slices where the space between them exactly match each slice (so that half the pizza, gets to be full the pizza and thus if x is 100% bigger than half the area of the whole pizza then it would still fit the diameter), let's say the fewest cuts needed are: (x/100)-1.

I'm probably wrong with my equation though, but I think my reasoning is correct; if x is 100% (thus equal the full pizza) then it would fit without any cuts. But if x is smaller than that, then we need to make cuts with equal spacing so that it again fills the entire area of the pan, the cuts should be made so that the spacing + the area of the slizes makes up for 100% of the full area of the pizza.

Thanks Cyperium for your kind reply. Yes it is areas, not diameters.
I did this to avoid equations involvng Pi which cancels in a question about pizza pie.

The difficulty we have answering is the fault of Maths. Maths is very unhelpful at telling us where to start and how to think!
You have given us a great place to start - a formula.
Formulae are nice - for like diagrams you can see what the consequences are
So let's test formulae like the one you suggest:-
OK, if the round pan area is 2A then no cuts are required and our half pizza fits snugly occupying half the pan.
But if the round pan has only area A then NO SPACE WHATSOEVER will be left if and when we manage to fit area A within it. To do that will require an infinity of straight cuts just to intimately contact the curved pan boundary
So the number of cuts might be something like 1/(x/100)  - 1
Perhaps that is pessimistic, for it says 9 cuts for x=10%
That COULD agree with common sense but
it says ONE more cut is all that is required for x=50%.
Does that seem reasonable to you?
The best I have managed experimentaly for a half 12" pizza is one more cut fits the two resulting pieces in an 11" pan and the two pieces differ a lot in shape.

What I find most interesting is why and HOW did such a simple question get to have an answer beyond the reach of maths and computing.

#### Mrwhy

• Hero Member
• Posts: 2890
• My Dad called me Mr Why when I was 5.
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #19 on: September 27, 2011, 01:58:44 AM »
Quote from: vrensul on September 26, 2011, 09:28:15 PM
Ya I thought you were trying a stab at me lol.  Ok no offense taken then.  Anyhow..  All this stuff about the pan and the pizza and the cuts just make me hungry.  I'm going to attempt to solve this with my complete and total lack of superior mathematical aptitude.

I imagine that if you wanted the pizza in a pan shaped different than it's current circumference then cutting it in half only makes it seem like there is a problem in the first place.  Really there isn't a problem at all.  All you need to make new "slices" and spread them around in the circle so that they cook just as evenly as the original full circle (ahem, pizza) would.  Your spacing would be the original total outside measurement (circumference) / the outside arc of each piece.  So if your Circum was 100, and each piece was an Arc of 10 and you only had half (50) then you would need to space them by 2.  Did I win?    I bet Pi is in there some where and I lost because of the stupid pi, even though it's a pizza.

If I knew the answer to this question I would not be asking you guys to help
At least using common sense we have a place to START.

This is what I tried
I cut my half-pizza into two - each an exact copy of the other (each is a quarter-pizza)

When I shoved them up together I got back my half-pizza - not a good start eh!
So instead I put them point-to-point. Humm - no good, still requires the full pizza-diameter.
Next, for want of ideas we SLIDE them closer so they now begin to contact ALONG part of an edge
This SLOWLY shrinks the distance between the outside corner of piece A and the outside corner of piecs B.
But not very much at all. Maybe fits half a 30 cm pizza as two pieces inside a 24 cm pan.

But your idea takes this far further. You could indeed be onto a solution.
Once the "pointed ends" of the pizza-pieces begin to share part of an edge it gets a bit complicated.
Perhaps we need each piece to be a "sprite" and slide it around by using the mouse (no nibbling!)

#### Cyperium

• Hero Member
• Posts: 3285
• Knowledge is good, but understanding is better
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #20 on: September 27, 2011, 04:29:02 PM »
We need to distribute the cuts so that we can space them evenly to fit the full pizza. Where the cuts needed for 100% would be 0. We know that much (and this was the only clue I had of the calculation, although I misplaced the x, it should be (100/x)-1, but I realise that the calculation wasn't right).

The problem is rather that the half the pizza just simply won't fit with straight cuts through the middle. Instead you have to cut it straight through some other point, and this makes it mathematically much more complex. I don't know that much about maths really, I would really need some basic techniques to write about in my "How to..." tutorial in the Wiki, not only for the people that read it, but also for me personally since I often come across such problems when I program.

Also, I think there is a limit where it won't fit no matter how you cut, since they will overlap at some point anyway. It's hard to find a math solution which has that kind of limit. It would have to go infinite, if so. Yeah, I think there are many problems that just can't be solved with maths, no wonder they have so many unsolved problems in cosmology and physics when it comes to infinities, they probably hit a limit of something, but how would you know that? How would you know that you hit a limit, and not actual infinity?
« Last Edit: September 27, 2011, 04:35:44 PM by Cyperium »
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

#### Mrwhy

• Hero Member
• Posts: 2890
• My Dad called me Mr Why when I was 5.
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #21 on: September 27, 2011, 07:28:38 PM »
Like this
Take the half-pizza and cut it exactly into 2.
Put the two 90 degree pointed ends together and it overlaps the pan of course.
So SLIDE the pieces into LINE CONTACT nose-to-tail. (Think of 3 wedges stacked like a W and remove one outer wedge)
It NOW does fit in a slightly smaller pan
To fit it into a yet smaller pan, you can see (trial and error) the the cut we made should NOT divide the half-pizza eaqually but "at a skew", giving a LONGER CONTACT LINE than the original pizza radius.

I agree about infinity. It is best left, useless, in school lessons. Our real world has no infinities.
« Last Edit: September 27, 2011, 07:38:35 PM by Mrwhy »

#### Clippy

• Hero Member
• Posts: 16431
• I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #22 on: September 27, 2011, 09:22:50 PM »
Quote
It is best left, useless, in school lessons. Our real world has no infinities.

You will NEVER LEARN ANYTHING because INFINITY is where you left your brain!
QB64 WIKI: Main Page

#### Cyperium

• Hero Member
• Posts: 3285
• Knowledge is good, but understanding is better
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #23 on: September 29, 2011, 05:00:01 AM »
Either way, this math problem is too advanced for me. As I don't know that much about maths I can't know if it can be solved or not. Also, I think that there might be real infinities, don't know about that either though, but I don't like to pretend that I know it all and can rule things like infinities out. Maths seem to suggest many infinities, although it can't calculate them (singularities in black holes, for example).
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

#### Mrwhy

• Hero Member
• Posts: 2890
• My Dad called me Mr Why when I was 5.
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #24 on: September 29, 2011, 05:54:10 AM »
Cyperium, the cleverest people ARE clever because the DO realise how little they know.
As for knowing if a problem is soluble or not, I have asked those who consider themselves world class top mathematicians and they all agree. "If you FIND IT then there is a way. Otherwise there in no way to tell!"

#### Clippy

• Hero Member
• Posts: 16431
• I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #25 on: September 29, 2011, 08:55:50 AM »
Quote
Cyperium, the cleverest people ARE clever because the DO realise how little they know.
We ALREADY KNOW how little you know! You CONSTANTLY REMIND US! There is a difference between being inquisitive and being a total waste of time. I don't share your hopelessness and we certainly don't need it here!

JUST LOOK at the TITLE of this thread! WTF does that SAY about YOUR VIEW of QB64?

You act as if QB64 is supposed to SUDDENLY make everything work the way YOU WANT things to!

NO PROGRAMMING LANGUAGE WILL EVER BE GOOD ENOUGH FOR YOU, BUT ISN'T THAT THE WHOLE POINT?
QB64 WIKI: Main Page

#### Yamatara

• Full Member
• Posts: 115
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #26 on: September 29, 2011, 12:34:44 PM »
If you want a language to do something that it can't do, then find a way to make it work. That is what DECLARE LIBRARY was designed for. This way you can create libraries from other languages that can do what you want and be able to use it in QB64. You can't leave all of your eggs in one basket as they say.

#### unseenmachine

• Hero Member
• Posts: 3285
• A fish, a fish, a fishy o!
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #27 on: September 29, 2011, 01:55:07 PM »
Quote
Cyperium, the cleverest people ARE clever because the DO realise how little they know.

We ALREADY KNOW how little you know! You CONSTANTLY REMIND US! There is a difference between being inquisitive and being a total waste of time. I don't share your hopelessness and we certainly don't need it here!
A bit harse, but i sort of agree, especially after i spent 3 hours making a puzzle game for MrWhy after several requests and he has totally ignored it.

QB64 is only as limited as the person using it.

Unseen
GDK Tutorial : http://dl.dropbox.com/u/8822351/UnseenGDK_Tutorial.doc
VQB02 : http://dl.dropbox.com/u/8822351/VQB02.zip

#### Cyperium

• Hero Member
• Posts: 3285
• Knowledge is good, but understanding is better
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #28 on: September 29, 2011, 03:50:53 PM »
If it doesn't work with QB64 then it doesn't work with any other language either. I know that it seems very naive to think that way, but this is a pure math problem, and QB64 doesn't have any limits when it comes to math as long as you can put the equation together. Or are there mathematical functions that can't be ported to QB64? I would like a example of the same problem being solved in any other language, I'm sure that if we looked at the equation we could easily transfer it to QB64.

In defence for Mr. Why, I don't think that he meant it that way, I think that he rather meant; "With programming, you can do anything?", if you get the point. It's simply not a easy problem to compute, even if it to our multibillion cell brain seems like a very easy task to solve in real life (and even in imagination).
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

#### Clippy

• Hero Member
• Posts: 16431
• I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
##### Re: "With programming, you can do anything!" But not with qb64?
« Reply #29 on: September 29, 2011, 06:32:39 PM »
OK, I'll GIVE MR WHY A CHANCE!

Tell him to REWORD the two recent thread TOPICS that he has DISPARAGED QB64! Then I'll leave him be!
QB64 WIKI: Main Page