Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

This is the start of infinity.

Then there are the grand kids, the great grand kids and etc. All of them coming to visit overnight at least twice a week, at the same time and all that goes with it diapers, sniffles, falling down and of course love. But once you start it's like an avalanche impossible to stop.

But then at some point you realize that all the little inconveniences and comedies add up to a non logical conclusion (love).

Left to your imagenation.

curtis

**Raider0451**- Replies: 4

This farmer would have the preacher over for sunday dinner, every sunday. After dinner he would

start haggaling with the preacher over a set of mules that the preacher owned. This went on for years and the farmer and preacher just could not get together on the price. But the economy got bad and the parrishioners just didn't have the income to support the Preacher.

So the preacher decided to give in and sell the mules to the farmer. He went that sunday to dinner and sold the mules to the farmer. Now you know mules are dumb creatures and will do the just the opposite of a horse. Where you couldn't force a horse to jump of the side of a hill the mule will go willingly.

Now the next day the farmer hooked up the team of mules to the wagon and decided to go to town. So he got on the wagon and said getty up and the mules just sat there. So the farmer thought and thought now what did that preacher say to make them start oh yea "Praise the lord". So the mules started and the farmer wanted to know how fast they were so he "Praise the lord" and they went a little faster, "Praise the lord" and faster still and he continued this until the mules were running as fast as they could go.

Then the farmer started trying to stop the mules because of a curve in the road and they wouldn't stop. Now what did that darn preacher say to stop the team oh yea omen "!omen!" "!omen!" and the team stopped just off the road at the edge of a cliff.

The farmer said "whew.............Praise the lord"

Curtis:

There are ten more oaths to the Creed.

I will post them later.

I don't believe you caught on to the last It was a procastination.

LOL

curtis

Hi all,

John, Mathisfun and Bobbym after trying Johns method and it worked. But a little jumpy when it was scanning. So I went back to some old notes. It took a lot of searching about 2 hours going threw old notes and formulas to find it.

I thought they were lost in a move But my wife remembered seeing them in storage.

But I do not wish I had tried to find them before because it caused me to discover this site. I have learned more in the few days that I have been on this site than in several months in school.

So the following is the notes and formula that will take an input and transform it to a value between a min and max.

Equations used in calculating a linear relationship:

Scaled value = (input value x rate) + offset

Rate = (scaled max. - scaled min.) / (input max. - input min.)

Offset = scaled minimum - (input minimum x rate)

Translation to needed to formula for use in program

Original new description

Scaled value = r = (rate of deduction)

scaled max. = rmax = (r maximum scale)

scaled min. = rmin = (r minimum scale)

Input Max = Imax = ( Maximum value of al)

Input Min = Imin = ( minimum value of al)

Rate = Rate1 = (calculated Value)

offset = offset = (calculated value)

r = ( al * rate1 ) + offset

rate1 = ( rmax - rmin ) / ( Imax - Imin )

offset = rmin - ( Imin * rate1 )

This is the program line used in the computer

r = (al * (rmax - rmin) / (Imax - Imin)) + (rmin - (Imin * ((rmax - rmin) / (Imax - Imin))))

Thanks for your help

I know I'll be on this site a lot

For now I have to get back to my program

But I'm Like a bad apple I'll keep showing up

Curtis

Hi BronzeFury,

I studied boolean in electronics but it has been years since I used it. But there are some references to in posts search for Boolean Algebra and here is a link to Wiki that gives a explantions to boolean.

http://en.wikipedia.org/wiki/Boolean_algebra_(logic)

hope this helps

Raider0451

Thanks John

I think this will work I only have to have 100 points of the plot to compare the al value to and the 2nd element of the array would be the answer or rate.

Thanks very much I was stuck and now I see light.

Curtis

John,

This is what I have been studing for the last two days. LOL

John,

That is a much simpler formula than what used in the PLC's I have been using. They had a formula that could be divided into three parts the actual volatge input conversion, the result conversion and the output conversion. Very complex.

I can see right off that it works for a positive conversion.

But what if you have the same parameters as above and you plug in an input of 1 or 9 then you get 200 and 1000. That is the problem I am running up on. That is when the input can be from 0 to 10 and I want the output range to be between 300 and 800 or 400 and 600 etc. Where the input is larger than the allowable range that is where I am running into trouble.

Curtis

John.

Yes it would in a standard calculation and that is one of the reasons I cannot get any of the formulas that I have used in PLC programming to work. In plc programming there is a calculation that is used to scale an input siginal 0 to 20 mv to an output of 0 to 60 Hz. This uses a 16 bit register which has a maximum of value of 32768. The 0 to 20 mv is converted to 0 to 32768 then a input minimum value(Imin) and input maximum(Imax) value is used to say that the 0 to 32768 = Imin to Imax. In this way you can set the Imin to any value less than Imax and Imax can be set to any value greater than Imin and the result of the actual input value will fall between the two. The output calculation takes this result and uses it with the Omax, Omin to calculate a value that falls between Omin and Omax. The output is then coverted to depending on Omin and Omax to Hz. Example 10 mv input siginal is coverted to 16384. This then is coverted if our Imin is 1000 and Imax is 10000 the the result would be 4500. if the 10 mv changed to say 5 mv with the same parameters then input would be 8192 and the result would be 2250.

I need this so that the value being deducted from energy is lower when the value of alcohol is higher. Alcohol is energy and alcohol is being deduct at 2x the rate of energy at this moment. But Alcohol at this moment does not affect the game except for the speed the man walks. So they have no reason to purchase alcohol but if they Know that it slows the energy rate down then they will be more apt to use alcohol. This will increase the fun by being arrested for public drunk and make gameplay adjustable as to hardness.

But either the formula I remember is incorrect or the requirements are very different. It is most likely my memory.

curtis

Hi Mathisforfun,

You have open another door. LOL

It has been so long since I made a graph that it will take me a little while to refresh my memory on graphs, and polynominal is a subject that I don't remember anything about. So allow me a little while to study these two areas so that I can present an intelligent reply. As I said in the introduction post I started reviewing algebra. I think I need to finish this review before getting into other areas. It will not take long to finish because the way it is presented makes it so easy to understand. I think this site is great and just what I was looking for.

By the way while I was browsing I noticed a post you posted about studing Quantum Physics. I read two or three pages of it. I understood it till it got to page two then it all went above me. LOL

Thanks I will make a graph and post it after I can review a little.

Raider

John,

Your suggestion is a good one and that is the way I have it written now.

Maybe a breif discription of the program will help. The program is cartoon like with a man walking around a city picking up items that he can sell and money thats been dropped. He has to buy food and/or drink to stay alive. Once he has made enough money then he can get cleaned up and work to earn more money. He can purchase things like a home, cars and jewlery. All of these items he can use in some way. There is a bank where he can make investments, and deposits to different accounts. Also if certain accounts get overdrawn for a certain lenght of time this causes the game to end. There are Robbers, Police, and other people walking around. The robbers steal you money and Police arrest you for vagrancy or public drunk. You can take bus rides, a limo, a sports car ect. to your home. But you have to pay for all of this such as when you own a home you have to pay morgage or lease, lights, water, gas,and upkeep.

Those are just a few thing that is in the program. There are quit few others and some that I have not added yet such as a cosino with a one armed bandit (that I have already written and it was a math nightmare). The slot machine is a good program by itself. I wrote it seperate because the size of the project was slowing my programming software down.

The energy and alcohol level is the stall point. I cannot see a way of tiying them together other than using a calculation that as alcohol is increased the energy level rate of decrease is decreased. Their are multibale reasons for not using if statements to reduce the rate at certain points you. One thing is if your were watching the alcohol and energy when the change was made it would be very visable. Another is the time used by each if statement. I have only a certain amount of time available because of the graphics. The more if statements I used the worse the graphics flow. This program logic is very large.

Thanks John

Hi John,

I decide after viewing some of the posts that I needed to review basic algebra. I am presently on the mathisfun algebra website reviewing the basics and I wish back when I was studying math that I had it explained to me the way it is explained on mathisfun. This site is great. Not only for biginners but for people like me. Who has not studied math in so long a time.

I think maybe my understanding just increased greatly.

John I will enjoy seeing your posts and I made a post on Help Me about a project I'm working but I think I may have stated it wrong. I haven't reviewed algebra basics fully yet But I already see a mistake that I was making in trying to Change a equation. So my efforts at trying to figure out the formula that is needed showed me that I was further down the Math learning path than I had thought. I have forgotten more than I thought I had.

Radier

Thank you Mathisfun and bobbym for the welcome,

I am going to enjoy this forum. The warm welcome came as an unexpected, but pleasant surprise.

Raider

**Raider0451**- Replies: 20

Hi,

This is what I want to happen and I dont even know if its possible.

The app uses two progressbars one is labeled en = energy level and the second is al = alcohol level

As the alcohol level increases. The amount deducted from en decreases and allows longer game play before having to purchase food or drink. If en = 0 game ends. So with the above given I believe I need the following variables to caculate for r = en reduction rate. Where the range rmin & rmax is values that determine the range of r. Also the maximum that rmax value can be is .99 and the minimum that rmin value can be is .1.

Rmx = range maximum preset before calculation by program selection for easy, medimum, hard

Rmn = range minimum preset before calculation by program selection for easy, medimum, hard

al = variable from 0 - 1000

al has to be reversed with this added into the formula

al = 1000 - al (al now is 1000 to 0) (this so when the vlaue of progressbar is high it will give lower reduction rate and when it is low it will give higher reduction rate)

r = the amount deducted from en level. This sets the speed at witch the energy level is decreased.

I plan on when in easy mode at having rmx = .5 and rmn = .1 and on hard rmx = .25 and rmn = .2.

But this has to be adjustable so I can tune the game.

All of the above is needed because of game design. At night food purchase is very restricted and alcohol is about all that can be purchased because the only thing open is a bar. So this leads to a no win situation. When alcohol is purchased a certain amount of energy is also given. What I am trying to do is reduce the amount of energy deduction when the littleman has high alcohol levels.

I futher explaination is needed I can try but it has me scratching my head.

Raider0451

**Raider0451**- Replies: 6

Hello everyone,

I am 58 years old and a Senior Industrial Electronics/Computer Tech. I enjoy hunting, fishing and computer programming. I am just a beginner at programming. I also have not studied math in 30 years but have fair skills due to the electronics background. All of the math I have is based on formulas used in electronics.

During the writing of a program or application a lot of math is used. On occassions the programmers run into a math problem that thier math skills is just not good enough. This has happened to me on several occassions. I am looking for a good place to ask and recieve help. But I am also willing to give help in any way I can.

I am here to try and learn a little more. If a day goes by and I have not learned something new then it was wasted. I believe this applies to use all.;)

Raider0451:

Pages: **1**