Monday, May 26, 2008

Saturday, May 24, 2008

Sunday, May 18, 2008

Assignment 3

(1)
























I used the Chromaticity Diagram to determine the corresponding values (x,y,z=1-x-y) for the values of the wavelengths W=380, 420, 460,...,700.
(2)
P1(x1,y1) - coordinates of color 1
P2(x2,y2) - coordinates of color 2
P(x,y) - coordinates of a color C on the segment determined by the two points
c1-percentace of color 1 in C; c2 - percentage of color 2 in C
We know that: c1*(x1,y1) + c2*(x2,y2) = (x,y) therefore we obtain:
c1*x1 + c2*x2 = x
c1*y1 + c2*y2 = y
We know that between two colors there can't be a third one, so c2=1-c1 which gives us
c1*(x1-x2) = x-x2
c1*(y1-y2)=y-y2
We obtain the formula for finding the concentration of color 1 in color C: c1 = (x-x2)/(x1-x2) = (y-y2)/(y1-y2) and c2 = 1- c1.
Notes:
We know that (x1,y1) different from (x2,y2), therefore either x1 is different from x2 or y1 is different from y2, so we do have a valid formula in all cases.
In the double equality above, the last equality is equivalent with the fact that P lies on P1P2.
(3)
P1(x1,y1), P(x2,y2), P(x3,y3) - coordinates of the three given colors
P(x,y) point interior to the triangle P1P2P3
Similarly, c1*(x1,y1) + c2*(x2,y2) + c3*(x3,y3) = (x,y)
We obtain a linear system with three unknowns, c1, c2, c3:
c1*x1 + c2*x2 + c3*x3 = x
c1*y1 + c2*y2 +c3 *y3 = y
We can substitute c3 = 1-c1-c2 and obtain:
c1*(x1-x3) + c2*(x2-x3) =x-x3
c1*(y1-y3) +c2*(y2-y3) =y-y3
The discriminant of the system is delta = (x1-x3)(y2-y3)-(x2-x3)(y1-y3)
delta1=(x-x3)(y2-y3)-(x2-x3)(y-y3)
delta2=(x1-x3)(y-y3)-(x-x3)(y1-y3)
c1=delta1/delta and c2=delta2/delta
(used Cramer formulas)
(4)
In the RGB model R(red) corresponds to the x axis, G(green) to the y axis and B (blue) to the z axis. The normalized coordinates are in the following table. The CMY components are determined by the formula: (C,M,Y)=(1,1,1)-(R,G,B) which means each color will transform into its complement.Complement colors: b and W, R and C, G and M, Y and B. The gray border will remain gray.

From the table, the components are:
C=(1,0,1,1,1,0,0,0), M=(1,1,0,0,0,1,1,0) and Y=(1,1,1,1,0,0,0,0).




b)
The resulted components will be the complements of the first ones: white, Cyan, Blue, Magenta, Red, Yellow, Green, black (in this order). The gray border will remain gray.

(5)
Inverts color means it turns each color into its complement: R-C, B-Y, G-M, b-W. This would then be equivalent with converting from RGB to CMY, so the transformation is given by the four equations presented in class (6.2-2, 6.2-3, 6.2-4).
If we apply this transformations to CMY, we'' have to substitute R, G, B in the formulas with their complements: 1-C, 1-M, and 1-Y respectively. We obtain:
"teta"= cos^-1*{(1/2[(M-C)+(Y-C)]/sqrt[(M-C)^2+(Y-C)(Y-M)]}
H="teta" for Y<=M and 2*pi-"teta" for Y>M
S=(C+M+Y)/(C+M+Y-3)*(1-max(M,Y,C))
I=1-1/3*(C+Y+M)
(6)
a)
The saturation (S) and intensity (I) will remain the same as they are symetrical formulas in Red and Blue. The Hue (H) may change.
b) Swapping the Red and Blue channels in GIMP.

Monday, May 12, 2008

Assignment 2

(1)
0000=xAND(NOTx)
1000=NOT(xORy)
0100=yAND(NOTx)
0010=xAND(NOTy)
0001=xANDy
1100=NOTx
1010=NOTy
1001=((NOTx)ORy)AND((NOTy)ORx)
0110=(xAND(NOTy))OR(yAND(NOTx))
0101=y
0011=x
1110=NOT(xANDy)
1101=(NOTx)ORy
1011=(NOTy)ORx
0111=xORy
1111=xOR(NOTx)
(2)
0000=xXORx
1000=xXOR(yIMPLx)
0100=xXOR(yXOR((xIMPLy)XOR((xXORx)IMPL(xXORy))))
0010=(xIMPLy)XOR((xXORx)IMPL(xXORy))
0001=xXOR((xIMPLy)XOR((xXORx)IMPL(xXORy)))
1100=xIMPL(xXORx)
1010=yIMPL(xXORx)
1001=(xXORy)IMPL(xXORx)
0110=xXORy
0101=y
0011=x
1110=xIMPL(xXORy)
1101=xIMPLy
1011=yIMPLx
0111=yXOR((xIMPLy)XOR((xXORx)IMPL(xXORy)))
1111=(xXORx)IMPL(xXORy)
Therefore all 16 functions can be written using only complositions of XOR and IMPL.
(3)
(a) Comutative functions: 0000, 1000, 0001, 1001, 0110, 1110, 0111, 1111

(4)
Working in ternary we have 3x3=9 possible combinations (x,y). Our functions will then be columns of 9 digits 0-2, which means 3^9=19683 possibilities. Therefore, there are possible 19,683 bynary operations.
(5)
For binary inputs , there are necessary three operations: AND, OR, NOT to represent all the possible functions.
From my research through the internet, I found out that for ternary inputs, in order to represent all 19,683 possible functions there are necessary four operations: AND, OR, NOT, IMPL .
(6)
(b)

pic1ANDpic2 pic1ORpic2 pic1IMPLpic2


pic1IMPLpic2=(NOTpic1)OR(pic2)
black=1, white=0
black or black =black
white or white =white
black or white =black
white or black =black
For finding pic1IMPLpic2 we imagine overlaping the two original pictures. In the area where the first picture was black and the second one white we will obtain white. The rest of the picture will be black.
(7)
Let:
a=Poison caused the victim's death.
b=There was a change in the blood chemistry.
c=There was a residue of poison in the stomach.
d=There were puncture marks on the body.
e=Poison was injected by a needle.
a IFF (b OR c)
(NOT b) AND (NOTc) AND d
e IMPL d
a XOR (NOT d)
(8)
1)
64K=2^6K
1GB=2^10MB=2^20K
2^20/2^6=2^14 times more memory
2)
1floppy=800K
1DVD=4.7GB=(4.7)x (2^20)KB.
(4.7)x(2^20)/800=6160.384
Therefore we would need 6161 floppy disks to save all the data on a single DVD.
3)
Processor clock rates of early computers:
The clock rate is the fundamental rate in cycles per second (measured in hertz) at which a computer performs its most basic operations such as adding two numbers or transferring a value from one processor register to another. Usually when referring to a computer, the term "clock rate" is used to refer to the speed of the CPU.
The first commercial PC, the Altair 8800 (by MITS), used an Intel 8080 CPU with a clock rate of 2 MHz (2 million cycles/second). The original IBM PC (c. 1981) had a clock rate of 4.77 MHz. In 1995, Intel's Pentium chip ran at 100 MHz , and in 2002, an Intel Pentium 4 model was introduced as the first CPU with a clock rate of 3 GHz.

Assignment 1

(b) "Copying from the internet is not cheating"

As a teacher I personally would not be worried about students copying from the internet or other resources when doing homework. I state that because in my opinion, grades should have two main components: homework assignments and exams. Researching materials available on the internet in doing homework assignments is the same as going to the library, researching and using everything available. The internet just makes research and exchanging ideas easier and faster. When assigning homework, as teachers, we have to be aware that our students have available numerous printed and not printed resources, share ideas with their peers, or even have the professional "help" of a hired tutor. I believe homework is an important part of the grading scheme because it shows how much effort a student is willing to put into that course. Therefore, when I mark homework, I grade the corectness of the methods and answers and the amount of effort that the student has put into that piece of work, creativity, etc.
Even if I decided to assign different homework questions to all my students, I do not believe I can be 100% sure that they did it without anybody else's help. I think it is more important for me to know how well the student has mastered the tought concepts. Therefore I would use another big component as part of the grade: class participation and exams done without any available materials.

Thursday, May 8, 2008

May 7

Hi everyone,

I was looking back in my old math notes and found the definition of IMPLIES:
xIMPLy=(NOTx) OR y.
The way I remember the table for IMPL is:
"The True (1) cannot IMPLY something False (0)".

On the other hand, I am not sure about the exact meaning of question 1 in the 2nd assignment: does it mean we have to show that every column has to be written as a combination of AND and NOT or OR and NOT?
Or it means that we have to show that every bynary function (column in the table) can be written using at least one of the operators AND, OR, NOT? Am I trying to simplify things now, or this is what is being asked?

Thanks,

Ella

Wednesday, May 7, 2008

First Class

Just to say "Hi!...I'm (finally) here..." to Mike and everybody else in Math 5300.

I'll try to post a few thoughts on the two topics in the comming days...
Otherwise, I can't wait for the MATH part to come.
Hopefully there will not be a lot of essay writing...

Ella Lee