Code center > Suggestions

Varying sight distance as a function of eye width

<< < (3/5) > >>

EricL:

--- Quote from: fulizer ---if you want to be able to see 360 egrees around and need to see as far as you can you need to divide the 10 eyes into equal areas
360 (the number of degrees in a circle) divided by 10 (the number of eyes in a bot ) = 36.
thus making 36 degress (not bot mesurments) the best way to see as far as possible while seeing all around you
--- End quote ---
Please...

First, to state the obvious, bots have 9 eyes, not 10.

The area an eye of width W (0 <= W <=36) is given by:

A = (1 - log(W)/2)^2 * PI) * (W/36)

If someone wants to find the eye width that mazimizes coverred area for a specific eye, one needs to maximize the value of A over the range 0 <= W <=36.

EricL:
I need to point out that in the corse of implimenting this, it became apparent that VB6 does not include a log operator (base 10).  It only includes a natural ln operator (base e).   I'm lazy, so the actual formula as implimented in the code is:

S = 1 - ln(W)/4 where W is the eyewidth as a mutplie of standard Pi/18 eye widths.

See the first post in this topic for context.

I would appreciate any feedback on whether the eyesight sensitivity represented by this formula meets with people's approval and expectations.

Numsgil:
You can implement log10 by doing ln(x) / ln(10)

EricL:

--- Quote from: Numsgil ---You can implement log10 by doing ln(x) / ln(10)
--- End quote ---
I'm sorry, what part of "I'm lazy" did you not understand?  

That's bascially what I did.  ln(10) ~= 2.3.  I  rounded down.

rsucoop:

--- Quote from: EricL ---
--- Quote from: Numsgil ---You can implement log10 by doing ln(x) / ln(10)
--- End quote ---
I'm sorry, what part of "I'm lazy" did you not understand?  

That's bascially what I did.  ln(10) ~= 2.3.  I  rounded down.

--- End quote ---

It may not be best for rounding down. Decimals arent really supported anyways, so it doesn't seem even necesary to use algebraiclly derived forumlas for a geometric process. Just use geometry. The function of log returns the exponent; where 10^x = 3 | x has to equal the proper exponent to equal that. So don't use log for this problem. Whil it is a great idea to have a logorythmic eye form, it may be best to go with the more natural modded, as is the human eyesight. Modular functions of the eye length would mean that the result could be returned to compare the idea that we have here, bot length. The eyelength is already dependant on the radius of the Bot, is it not? If I am not mistaken this was already used for how eyes return values, with 100 being equal to a bots radius twice. It seems this was a very great conecpt, the eyes were on the outside and no matter what, the eye returned some value equal to its radius. Without this, development of eyesight may be difficulkt genetically, and could hinder the creation of mutatant genuius creation of pure chance. This also means a small anoying miny bot would not be able to see as far as a bot twice its size with equal widths. I do see where you're coming from with the log form, it is a focal equation; but I think for easy implementation in genetic coding, it should be a modular form. Since we know the radius of the bot as a var, the eyewidth and length will automatically be limited by this, or at least should be. When I'm not so tired I'll present the formulas of these ideas; esentially, true vision could be achieved with such a modular function, as the log is basically a more complex form to the idea, I like where you're coming from, but unless eyes and focal magnification (or length magnification as you have changed it to do so), esentially, a bot could have 0 eyesight and still work.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version