Wikipedia:Reference desk/Archives/Computing/2013 August 10

Computing desk
< August 9 << Jul | August | Sep >> August 11 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


August 10 edit

problem in installing sound driver edit

I have installed windows xp after crashing my xp,but i have problem in installing sound driver .A software "driver robot" tell me that this driver is Realtek Ac97 ,i have tried to install it from internet but after many tries it is not properly installed. in device manager at multimedia audio controller ,other then ? mark ,! is appeared--True path finder (talk) 13:46, 10 August 2013 (UTC)[reply]

iPhone edit

Can anyone tell me please how to empty my iPhone of it's photographs, about 800 or so.. Thanks85.211.204.94 (talk) 13:46, 10 August 2013 (UTC)[reply]

Follow the instructions here. Once you've done that, you'll have to manually delete all the pictures from the camera roll to free up the space. Hope this helps! --.Yellow1996.(ЬMИED¡) 19:06, 10 August 2013 (UTC)[reply]


Worked a treat! Many thanks.85.211.204.94 (talk) 06:48, 11 August 2013 (UTC)[reply]

Intel Core manufacturing edit

In making Intel Core chips, I read that they make a wafer of chips. The best ones become i7, the next best ones become i5, and the worst ones that work well enough become i3. A typical i3 has two cores and 3MB of L3 cache. A typical i5 has four cores and 6MB of L3. A typical i7 has four hyperthreaded cores and 8MB of L3. There are clock speed differences too. So if a chip becomes an i5, they actually disable part of the L3 cache and hyperthreading, right? Bubba73 You talkin' to me? 16:31, 10 August 2013 (UTC)[reply]

I'd be very surprised if that was true. Intel has very good process control - they would not waste the wafer space to make all i7s if they need i3s. Product binning is primarily used to figure out which chips to sell at what frequency, not to move chips to a different class of product. --Stephan Schulz (talk) 17:06, 10 August 2013 (UTC)[reply]
It was on a youtube video about overclocking that I saw that they make a wafer of chips, and then make then i7, i5, or i3. The guy seemed to know what he was talking about, but he may be wrong. Bubba73 You talkin' to me? 17:18, 10 August 2013 (UTC)[reply]
I don't follow Intel's CPUs that well but I think [1] is accurate which suggests Xeons, i7s and i5s are generally the same line of CPUs and i3s and Pentiums (and perhaps Celerons?) similar although there may be other lines and obviously stuff like Atom are different lines. (I presume those with GMA4000 or GMA2500 are the same since I was under the impression these are fundamentally different GPU designs.) It used to be that most or all different cache sizes etc were the same die and some people mistakenly still think it's always the case, but this is much less the case for Intel now, however it still happens. As good as Intel's process control may be, there will obviously still be some that will fail. Precisely how many no one knows since Intel is very effective at disabling features, frequently by laser cutting them where possible and they don't of course reveal stats to the general public. However AFAIK, the general view is that a significant number of the CPUs probably didn't need the cache or extra cores disabled and pretty much all didn't need whatever feature like AES, hyperthreading, VT-MMU or whatever disabled. So more importantly, the more lines Intel has, the more they need to tape out and manage and while I'm not an expert I think it's not exactly simple. And by keeping fewer lines also makes managing their inventory easier. If they find they need more i7, they can just bin more of their i5s as i7s etc. (Note that binning is also frequently used to assign a TDP although I believe most mobile CPUs are different dies.) While all x86 desktop CPUs come with thermal spreaders nowadays, delidding isn't uncommon among extreme overclockers and if the CPU is delidded it's easy to see if it's the same die size or not (which doesn't necessarily mean it's the same CPU line, but does suggest you they wouldn't have saved wafer space.) Plus there would also be the issue of diminishing returns (in terms of increasing the number of CPUs they could get from one wafer). Or in other words, it's a tradeoff between many lines and the complexity that produces and few lines and the wasted wafer space from binning a 16 core CPU with 16mb cache (which works fine) to be a 1 core CPU with 512kb cache, remembering also that the higher you go the less relevance the cost of fabbing the CPU is. Nil Einne (talk) 18:59, 10 August 2013 (UTC)[reply]
Tom's Hardware guide is good. "See the i5 and the i7 are the same chips. The i5 is the lower binned chip with 2 mb L3 cache disabled and hyperthreading disabled. But the i3 is a different chip. " It seems a waste to disable things that would work. Bubba73 You talkin' to me? 20:21, 10 August 2013 (UTC)[reply]
  Resolved
Well. Tom's Hardware is good, but the linked source looks like a forum hosted there, not material published under their editorial control. --Stephan Schulz (talk) 06:44, 11 August 2013 (UTC)[reply]
Being able to switch off an area and derate a chip is good for yield. But even if a chip would work okay at a higher specification cutting down the number of designs is good. It has always been done, one mainframe had the circuit for the clock speed on the back of the label so it could be changed easily! Basically one can then charge what the market would bear for the different performance. Dmcq (talk) 13:24, 11 August 2013 (UTC)[reply]

Affine Transformations in java edit

Hello! I need some help understanding something new to me please. I would like to try some things out with affine transformations. As an example, let us say that we have an equilateral triangle defined using an Area Object. How could i take this original area and make three transformations as follows: Each transformation scales the old triangle to 50% and keeps one of the vertices in place. This would create a "Zelda Tri-force" or one of the stages of the Sierpinski triangle. ;)

I know at least that i must take the following steps:

  • Define the triangle as a Polygon, which inherits the interface "Shape"
  • Turn this into an area object, via the constructor that takes a shape object as an argument.
  • Use Class AffineTransform to create the appropriate matrices (this is the hard part i don't get.)
  • Apply the transformations to the original area, using the createTransformedArea method of the Area class

What type of matrices are needed?

Thanks in advance!

PS: Also, can i somehow change an Area object into something that can be filled using the Graphics class? Graphics can fill a poly, and a poly can make an area, but it doesn't look like an area can be made back into a poly! 216.173.145.47 (talk) 22:40, 10 August 2013 (UTC)[reply]

I found out that to scale the shape to 1/2 its size, i need to multiply by the matrix [[1/2][0]][[0][1/2]]. This is the proper affine transformation for scaling by a factor of 1/2. I then need to multiply by a translation matrix, but i cant find the appropriate matrix. Translation Matrix indicates a way to do this for a 3D shape, im using 2D, but the problem with this matrix is that it leaves an extra value, the 1 in the column vector. I therefore don't think this will work with java. i need a different matrix that doesn't leave this stray value right? — Preceding unsigned comment added by 216.173.145.47 (talk) 09:51, 11 August 2013 (UTC)[reply]

I may just be clueless - I see that an Area is a Shape and a Shape is a PathIterator, and the PathIterator had better give you three points, right? Then for point A you take A, average of A and B, average of A and C and make a new triangle Area, and likewise for B and C. Is that wrong? Wnt (talk) 20:33, 11 August 2013 (UTC)[reply]

I think i know what you are getting at. Yeah, after thinking this over, instead of using an affine transformation, i think its better to just do the math on the locations of the vertices and just make new polygons. However, i still need to convert them into areas and paint those, because i need to use the intersect methods of those to find where the polygons overlap. So, this theoretically gets rid of the affine transformation issue, but i still need to know how i can paint the interior of an Area object. Thanks for your suggestion Wnt :) 216.173.145.47 (talk) 22:21, 11 August 2013 (UTC)[reply]

The nice thing about using matrices for affine transformations is that you can combine several transformations just by multiplying the matrices. If you're transforming hundreds of objects in a scene, then this means you only need to transform each of them once, using the generated matrix. Just doing the math on each object the straightforward way takes a lot more computation. Use a 3x3 matrix instead of a 4x4 matrix for rotating 2D points, or if you have a class designed for 3D points just set the Z axis to 0. 209.131.76.183 (talk) 11:45, 12 August 2013 (UTC)[reply]

Here's what to do:

  • Don't deal with java.awt.Polygon - it's a legacy API, which deals only with integers and which doesn't properly interact with java.awt.geom.AffineTransform. Instead use java.awt.geom.Path2D.Double objects instead. You .moveTo the first vertex and then .lineTo all the subsequent ones; if you end up back at the first coord to which you moved, you construct a closed path - a polygon.
  • To render a Path2D.Double, use the java.awt.Graphics2D.draw(Shape) method (or .fill(Shape) to draw it filled).
  • Yes, java.awt.geom.AffineTransform is the right thing to use. No, you don't need to iterate through the points manually. Nor do you need to manually manipulate the underlying matrix (that's presented as a convenience - most of the time (including for your task) you need only call AffineTransform's .rotate(), .scale(), and .translate() methods. Remember that AffineTransform accumulates multiple such primitive transforms into a single transform, so you can apply them all in one go.
AffineTransform t = new AffineTransform();
t.scale(0.5, 0.5);      // half size
t.translate(0.0, 20.0); // move 20 units up (this is just an example; don't do exactly this in your Triforce example)
Path2D.Double somepath = mytriangle();
somepath.transform(t); // apply
  • It's easy enough for you to construct a primitive triangle, as I described above. And the code above shows how to scale down your original polygon. All you need to do now is to reproduce that triangle twice, and to move all three resulting triangles radially: one at an angle of 0 radians, one at a third of a rotation (2π/3 radians), and the last at two thirds of a rotation (4π/3 radians). Code to generate such a translation is fairly trivial:
static AffineTransform create_radial_translate(double angle,
                                               double magnitude){
  AffineTransform t = new AffineTransform();

  t.translate(magnitude * Math.cos(angle), magnitude * Math.sin(angle));
  return t;
}
  • Then you can use the constructor argument of Path2D.Double which takes an existing Shape and an AffineTransform and produces a clone of that shape with the transform applied:
Path2D.Double uno = new Path2D.Double(original, create_radial_translate(2.0*Math.PI/3.0, displacement)); // clone, move out at 1/3 rotation
Path2D.Double dos = new Path2D.Double(original, create_radial_translate(4.0*Math.PI/3.0, displacement)); // clone, move out at 2/3 rotation
original.transform(create_radial_translate(0, displacement)); // move original out (it's just a horizontal translate)

That's it. -- Finlay McWalterTalk 13:22, 12 August 2013 (UTC)[reply]

Could you explain why you would rotate triangles 120 degrees? Also, the documentation for AffineTransform the OP cited made it sound like it was almost a "straightedge-and-compass" method, philosophically unsullied by the transcendental imperfection of pi. But mostly ... when you average three points and reuse the variables appropriately, you do three simple additions and (potentially) three LSRs and some assignments. All this adding and scaling and rotating whole triangles sounds slow, isn't it? Wnt (talk) 14:40, 12 August 2013 (UTC)[reply]
I didn't rotate triangles, I translated them. -- Finlay McWalterTalk 14:49, 12 August 2013 (UTC)[reply]
Why you need Math.PI for a translation...... ? Wnt (talk) 18:12, 12 August 2013 (UTC)[reply]
His translation tool uses a relative polar/radial coordinate system. So he says to e.g. translate a distance equal to "displacement", at an angle \theta=4pi/3. Presumably there is something like create_rectinliear_translate, in analogy to create_radial_translate, but the radial bit is a more natural tool for this triforce/ sierpinski gasket application.SemanticMantis (talk) 18:26, 13 August 2013 (UTC)[reply]
Well, I should admit I have absolutely no comprehension of why anything here. Wnt (talk) 14:54, 14 August 2013 (UTC)[reply]