A question regarding a computers intelligence

Click For Summary

Discussion Overview

The discussion revolves around how computers determine the locations of icons on a desktop and how they manage user interactions, particularly in relation to saving files and the functionality of smartphones like the iPhone. The scope includes technical explanations of software behavior, hardware interactions, and user interface design.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • Some participants explain that computers perceive windows and icons as rectangles, with the system calculating mouse clicks based on coordinates.
  • One participant describes the role of device drivers in tracking mouse movement and translating it into screen positions.
  • Another participant mentions that the iPhone uses accelerometers and gyroscopes to detect orientation and movement, although there is some disagreement about the specific technology used.
  • Some contributions highlight that the computer does not "know" the location of icons in a human sense but can determine interactions based on coordinate systems.
  • There is mention of the complexity involved in software layers that manage user interactions and the processing of inputs from devices like mice and smartphones.

Areas of Agreement / Disagreement

Participants generally agree on the basic principles of how computers track mouse positions and manage interactions with icons. However, there is disagreement regarding the specific technologies used in smartphones, particularly whether they utilize gyroscopes or accelerometers.

Contextual Notes

Some participants express uncertainty about the technical details of mouse movement and smartphone sensors, indicating that further exploration of these topics may be necessary for a complete understanding.

Who May Find This Useful

This discussion may be useful for individuals interested in computer science, software development, user interface design, and the technical workings of smartphones.

Macwoni
Messages
6
Reaction score
0
A question regarding a computers "intelligence"

So I've been reading on Boolean logic and understand to a basic degree as to how the computer calculates it's binary but I would like to know how a computer knows where your icons are on a desktop.How does it know that when you click on save the first time in a window,then shrink the window and click on the save function,how does it actually know where the save function is going to be at all times? I imagine this has to do with the same technology as the mouse being able to move around the screen?

And another question regarding the new i phone,what is it that allows the iphone to have applications that let you interact with what's going on in the screen in relation to how the i phone is positioned? I know there probably won't be any simple answer to both questions but if somebody could point me to the right resources I have no problem taking the initiative to educate myself.Thank you for any help.
 
Computer science news on Phys.org


I'd like to be able to answer your first question, but I'm a bit confused about the minimizing.
  1. For the most part, when you click the save button it's initializing a class and that class is going to open a form and set itself to be modal (hopefully) so you can't do anything else while that form is open.
  2. When you select a location, that location is then verified to not exist, if it does exist then it's going to prompt you to overwrite (which is boolean flag in the class initialization), it passes the string back to the calling application which has been awaiting a response.
  3. The file you're saving then is saved to the location that you had entered in the save dialog class.
The mouse moving on the screen is something I don't have any idea about nor really want to figure out. Kinda like Einstein and determining the beginning of the universe, don't want to think about it because it'll worry me. :-)

The iPhone and other phones of that nature have a gyroscope built in that knows which way is down and a compass to determine which direction they're looking. So when the programmer is writing their application they are including an event to trap that direction changing and updating their program accordingly. (That's the easiest way I can say it)

Hope that answers your question!
 


Macwoni said:
So I've been reading on Boolean logic and understand to a basic degree as to how the computer calculates it's binary but I would like to know how a computer knows where your icons are on a desktop.How does it know that when you click on save the first time in a window,then shrink the window and click on the save function,how does it actually know where the save function is going to be at all times? I imagine this has to do with the same technology as the mouse being able to move around the screen?

And another question regarding the new i phone,what is it that allows the iphone to have applications that let you interact with what's going on in the screen in relation to how the i phone is positioned? I know there probably won't be any simple answer to both questions but if somebody could point me to the right resources I have no problem taking the initiative to educate myself.Thank you for any help.

Computers see windows and other components differently then you do on a monitor. A computer sees nothing but rectangles. A window is nothing more then a group of rectangles. Windows just keeps up with what rectangles are visible and their locations on a plane (like graphic calculators). Your mouse is associated with a point on the screen. When you click your mouse, the computer calculates what visible rectangle was clicked on, and then calls the function if any exist that is associated with that rectangle.

I'm not familiar with that technology; however, I would guess that it works by using sensors. When the sensors detect a change, they generate a hardware interrupt. When the software sees this hardware interrupt, it does what it is programed to do for that position.
 


Macwoni said:
I would like to know how a computer knows where your icons are on a desktop.How does it know that when you click on save the first time in a window,
Lots and lots of layers of software!
The mouse contains a tiny computer that counts how many times the wheel has moved and sends this to the PC. A bit of the software in Windows (or Linux or MacOSX) called a device driver responds to this and calcualtes the new position of the mosue.
It then tells the graphics layer that the mosue has changed, this then tells the graphics hardware to draw the mouse at a new position.
When you click the button it sends a similair message, then the software resposnsible for the desktop checks if you you clicked inside the area of any of the windows or icons. It then sends a message to the app to tell it there was a mouse click, the application then decides what code to run as a result of a mosue click on that button.
All this explains why on a computer capable of doing billions of operations a second it sometimes seems slow to do something like open a program!


And another question regarding the new i phone,what is it that allows the iphone to have applications that let you interact with what's going on in the screen in relation to how the i phone is positioned?
The iPhone has accelerometers that measure how the device is tilted (wrt gravity) and moved see http://en.wikipedia.org/wiki/Accelerometer
 


Tanner65 said:
The mouse moving on the screen is something I don't have any idea about nor really want to figure out. Kinda like Einstein and determining the beginning of the universe, don't want to think about it because it'll worry me. :-)

The iPhone and other phones of that nature have a gyroscope built in that knows which way is down and a compass to determine which direction they're looking. So when the programmer is writing their application they are including an event to trap that direction changing and updating their program accordingly. (That's the easiest way I can say it)

Hope that answers your question!

They don't have gyroscopes; they use accelerometers. They're nifty little devices, try Googling them.
 


The computer doesn't really "know" where anything is in a the sense that we usually use the word "know," but it is able to determine whether the mouse is in the "icon area." (For one thing, it put the icon there!) As the mouse moves around the screen, it's feeding the x and y coordinates to the system. The icons also have a coordinate system to which the mouse coordinates correspond. Essentially, when the mouse coordinates are within the coordinates of the area defined by the icon (which the computer doesn't even actually "see"), the program or file that the icon is associated with in the computer is able to be selected and run or opened by clicking the mouse. Hope that helps.

Mike
 

Similar threads

  • · Replies 13 ·
Replies
13
Views
1K
  • · Replies 35 ·
2
Replies
35
Views
5K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
3
Views
2K
  • · Replies 16 ·
Replies
16
Views
5K
Replies
74
Views
8K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 44 ·
2
Replies
44
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K