Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,789 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Math problem... #295100
10/22/09 23:08
10/22/09 23:08
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
hello.

this is my problem...

i want to know the % of the final color that is yellow.

We know that yellow = red + green.

so if i have:
10 parts of red + 10 parts of green = 20 parts , that will mix and give 100% of yellow

if i have 10 parts of red + 5 parts of green = 15 parts
here 5 parts of green can miz with 5 parts of red, giving 10 parts of yellow and 5 parts of non reacted red, the final color is not 100% yellow but only 50% ( i think!!)

this is the problem, what is the math equation.. that i can know when i mix A quantities of red + B quantities of green, which final percentage i will get of yellow. :S

maybe this is easy than i think but im missing something...

Please help me this is really frustrating. i feel lossing IQ lol

i tryed %yello = (A/B) *100 but this is not the solution...

Last edited by MMike; 10/22/09 23:10.
Re: Math problem... [Re: MMike] #295109
10/22/09 23:52
10/22/09 23:52
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
i think i solved lol. but if anyone wants to answer.. its free.

Re: Math problem... [Re: MMike] #295120
10/23/09 01:07
10/23/09 01:07
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Haha....... hm

Quote:
if i have 10 parts of red + 5 parts of green = 15 parts
here 5 parts of green can miz with 5 parts of red, giving 10 parts of yellow and 5 parts of non reacted red, the final color is not 100% yellow but only 50%


There are no 5 parts of red that do not react with green, yellow is no base color such as red or green or blue, it is a result of mixing them together (as you know). As a result there is no real percentage of pure yellow.

It would be easier to help you if I knew the purpose of your question.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Math problem... [Re: MMike] #295124
10/23/09 01:16
10/23/09 01:16
Joined: Oct 2009
Posts: 33
A
AlexH Offline
Newbie
AlexH  Offline
Newbie
A

Joined: Oct 2009
Posts: 33
Your issue doesn't really make sense from an external standpoint nor could I really understand your engrish.

Colors on a computer don't come in 'parts' they come in 3 bytes: Red Blue Green. So I don't get what you mean by 'parts'. However, I assume you aren't have troubles any more so it doesn't matter really, just know your presentation doesn't make sense.

Last edited by AlexH; 10/23/09 01:18.
Re: Math problem... [Re: AlexH] #295131
10/23/09 02:10
10/23/09 02:10
Joined: Oct 2009
Posts: 110
Porto-Portugal
Elektron Offline
Member
Elektron  Offline
Member

Joined: Oct 2009
Posts: 110
Porto-Portugal
The addition of ink is difrent of light.
Computers use light addiction. Painters use negative mixing inks.


Carlos Ribeiro aka Elektron
Check my blog: http://indiegamedeveloper71.wordpress.com/
Re: Math problem... [Re: Elektron] #295320
10/24/09 11:48
10/24/09 11:48
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
hld on

Last edited by MMike; 10/24/09 11:52.
Re: Math problem... [Re: MMike] #295331
10/24/09 13:28
10/24/09 13:28
Joined: May 2008
Posts: 301
Oxy Offline
Senior Member
Oxy  Offline
Senior Member

Joined: May 2008
Posts: 301
Just imagine a lightspectrum

http://hidden-technology.org/images/pics%20for%20site/lightspectrum.jpg


The human eye has receptors for 3 colorranges
which have their medium approximately at
red green and blue.

http://upload.wikimedia.org/wikipedia/commons/c/c2/Cone-response.png

For a human to see yellow, both the green and
red lightemitters (in the computerscreen) need to be on
(in about the same strenght).
Without blue beeing active.

If blue is active, the yellow will get brighter, up to
reaching a white-yellow.

There are other basecolors used in Printing media for example,
(magenta, cyan and yellow)
All have the purpose to simulate a full spectrum
by adjusting their values accordingly.

A true yellow can only be archived by emitting light in
the specific frequency (around 590nanomater). But the human eye approximates
yellow anyhow using its 3 color receptors.


Last edited by Oxy; 10/24/09 13:39.
Re: Math problem... [Re: Oxy] #295358
10/24/09 17:34
10/24/09 17:34
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
OK SO THE PROBLEM Here, the real problem is this one.. which is almost lik the yellow thing , because we are talking about combining things.


i know that Cl2 can react with H2 to form 2 HCL righ?

so if i have 10 parts of Cl2, and 15 parts of H2.

10 parts of Cl2 will combine with 10 parts of H2, leaving intact, 5 parts (excess) of H2.

So how do i calculate that reacting percentage?

if i have 10 to 10 its 100% used
if i have 5 to 10 its only 50%
etc etc, there is a expression that can be made here right?
that is what im looking for, i just talk about the colors to simplify but i think it was worse.

Re: Math problem... [Re: MMike] #295370
10/24/09 20:40
10/24/09 20:40
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
i could simply do the 5cl / 10H2 = 0.5 HCl , so 50%
in a formula it would be.. a/b = c , which a must be the minor number..
but because i dont want any hand of man here, i must make the expression by it self tell which is the minor and minor...

For that i will use a genetic Approach, by Mendel.

if we have the specie A and B, being A a pure genotype and b a pure genotype, it would be 2DNA strands so 2 alleles for each chromossome.
Because im using pure reactants, like H2 or Cl , they are pure .. so AA and BB, HCl is Hybrid, (AB)
thus, AA x BB this will give an offspring of combination of

1AA + 1 BB + 2AB ( or more specifc 1 AB + 1 BA).
Ok so now that i know this... i can put this into the formula and purpose and intermediary algebra expression where i put this genetic heritage thing...

i will call it R(genotype). And there will be 4 of this.

R(genotype) : R(ab) , R(aa), R(bb) and R(ba).

if i make R=sign(alele 1 - oposite alele 1)X alele2.. i will get this distribution of R alele 1, alele2...
Raa=sign(a-b)x a
Rab=sign(a-b)x b
Rbb=sign(b-a)x b
Rba=sign(b-a)x a

filtering the negative values to be zero, and out of the add:

Raa=(1+sign(a-b))* a;
Rab=(1+sign(a-b))* b;
Rbb=(1+sign(b-a))* b;
Rba=(1+sign(b-a))* a;

now that i got the R function i can compose it on another function, that will determine which value is the lower one by its own.

%= ( ( (Rba/2) + (Rab/2)) / ((Raa/2) + (Raa/2) ))*100


The lite-c function final is this:

function percent(var a, var b){

var Rab,Rbb,Raa,Rba;
Raa=(1+sign(a-b))* a;
Rab=(1+sign(a-b))* b;
Rbb=(1+sign(b-a))* b;
Rba=(1+sign(b-a))* a;
return((((Rba/2)+(Rab/2))/((Raa/2)+(Rbb/2)))*100);
}


function main(){
var reacting_p=percent(5,10);
var reacting_p=percent(5,5);
var reacting_p=percent(10,5); // the inverse, function will determine the minor number and major automatically.

}


all this to avoid using If minor then ... in a single expressiong..

Perhaps theres a batter way, but i just came up with this and it works so..

Last edited by MMike; 10/24/09 20:42.
Re: Math problem... [Re: MMike] #295374
10/24/09 21:00
10/24/09 21:00
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
this is useful to know for example..

you want to do breed with cheese and meat(dont know the word?)

having 20 slices of cheese and 15 of meat , how many compleat breed with can have .

Page 1 of 2 1 2

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1