[Q] How to draw arc on canvas using three points? - Android Software/Hacking General [Developers Only]

Hello everyone!
I'm trying to draw a ball using canvas. On that ball is a line (great circle) which when looked at 'head on', it looks like a straight line. If I rotate the ball 90 degrees (what I intend to simulate), the line would become and arc of varying radius, going from infinity to the radius of the sphere (origilal circle used to draw the ball). The problem is, as far as I know, only way to draw arc on canvas is with angle start, angle extent and centre, in this case, all unknowns. So, how do I draw that arc? Use some other drawing method?
Can anyone help with this one?
Thanks.

Related

[Q] screen editor (mirror screen)

Hey, yes you read it correctly, mirror the screen!
i was thinking the other night as i was driving back from a concert with my phone standing against the spedometer, as i passed a speed bump, it fell flat behind the steering wheel, and in the front window of the car i could perfectly see the navigation software, only, it was mirrored if i place it better.
this got me thinking, is there a way or an app that lets you mirror the screen?
like width "-100%" height "100%".
this way my phone can lay flat in front of the spedometer at night, and so can get an OSD Navigation on my front window
this seems like an extremely safe way, cause it isn't to bright, and you can see the road an the navigation at the same time!
anyone know where to get an app or hack for this?
I love that idea
Sent from my ADR6300 using XDA App
greeeeat idea...! I have a slot on my car to put the phone layed up to the rear glass and alredy thinked about someone could make screen inverted...
will try it out!

Compass problem

When I'm pointing dead north with the phone horizontal, I can tilt the phone vertical and the reading stays on north within a few degrees. When I point south or east and do the same the reading is off by 20 degrees or so. This is after recalibrating. It messes up Google sky for me because everything is off by about 20 degrees.
Anyone noticed the same?
Sent from my Nexus S using XDA App
Same problem here. Nexus S, Android 2.3.3. Sky Map is useless.
I was just about to open a new thread "Anyone else NS compass just plain wrong?"
Well seems so. Mine is partially accurate, sometimes. And then when it is you only have to do a 360 to see it go wildly wrong at some specific point. Like perhaps it will not accept East is a direction and flip out.
Every soft of manual calibration has failed to help, nor hard reset. After owning a Galaxy S i9000 i am willing to accept Samsung simply broke the chip somehow when building the phone. Here is hoping not..
So I'll just revive this topic and ask if anyone has any new ideas? Location appears to not be a factor, it just never works anywhere. No case on the phone either.
(And I am not Magnito)
i have the exact same problem.
Recalibrating the compass (Waving the phone in a figure 8 pattern) fixes the issue for me, but the problem usually pops up again within a day.
You can imagine the magnetic field of the earth has 2 components: A component that points towards magnetic North and a component that points up from (or into) the ground.
When your screen faces the sky, your phone uses the x axis and the y axis from the magnetometer to determine what direction it's facing. If north, then y axis reads zero.
When you tilt your phone vertical, you can still get a pretty good idea of heading from those same two axes (ideally X would now be the up/down component and Y would still be zero). However, if your phone is slightly tilted, that (typically much larger) up/down component bleeds into the Y and causes your heading to change. This has the advantage that you never need to read the Z axis.
This is why the best compasses include accelerometers to tilt compensate magnetic heading. If only our phone had accelerometers and the programmers used them.
Thanks for your description, so what is the conclusion? is this issue normal or a software bug?
I think I've got the same issue ,I've changed 2 nexus s , one is 2.3.1, the other one is 2.3.3, both have same isssue, check the video here:
http://www.youtube.com/watch?v=l-9lehX8u2U
report it here
http://code.google.com/p/android/issues/detail?id=15999
chadrockey said:
You can imagine the magnetic field of the earth has 2 components: A component that points towards magnetic North and a component that points up from (or into) the ground.
When your screen faces the sky, your phone uses the x axis and the y axis from the magnetometer to determine what direction it's facing. If north, then y axis reads zero.
When you tilt your phone vertical, you can still get a pretty good idea of heading from those same two axes (ideally X would now be the up/down component and Y would still be zero). However, if your phone is slightly tilted, that (typically much larger) up/down component bleeds into the Y and causes your heading to change. This has the advantage that you never need to read the Z axis.
This is why the best compasses include accelerometers to tilt compensate magnetic heading. If only our phone had accelerometers and the programmers used them.
Click to expand...
Click to collapse
My new i9020A has a horrible compass. Check it out next to my girlfriends stock 2.2 Desire.
http://www.youtube.com/watch?v=AkGYZ_nmbSw

[Q]a painting/doodling app that can actually detect touch size?

Hello everybody!
I've noticed on FPse that there was an option for using touch size for the virtual pad.My HD2 has a crappy touchscreen anyway so I didn't tick the box but then it occurred to me...
What do I need pressure sensitivity on my Wacom tablet if I can use a capacitive stylus as I use an actual brush?
I know Samsung are using a screen that can detect a touch point of "less than 2mm".Not so small in actual pen measurements but for a brush that will be amazing if I can cut myself a capacitive chisel brush and the app will change stroke size depending on how much brush is touching screen!
I've searched the net all over for a painting app that does that for android or(and in the worst case scenario) the iPad.
Any suggestions?
(Samsung are mentioned cause I thought bout buying Galaxy tab...)
Bump?Bump-bump?BUMP!
C'mon guys! At least tell me it's possible and I'm not dancing in a cloud castle somewhere!
Bumping again out of hope...
Last final bump.XDA, you disappoint me.

[SOLVED][Q] Any suggestions for wavy lines when drawing?

I have the Galaxy Tab 2 7.0, rooted with 4.0.4, and have not had any problems with it for the most part.
I recently downloaded Sketchbook Express to see how well the tablet could handle drawing. It handles it very well with one exception: the closer you get to drawing at a 45* angle, the more wavy the lines get. If I quickly swipe in that direction, it straightens out, but the slower I go, the more pronounced the waves or zig zags get. This happens using any of my fingers, the $20 Rocketfish stylus, and the $30 Wacom Bamboo stylus. All attempted on a freshly cleaned screen. I've also tried different apps with the same result. This guy had the same issue, as have others from what research I could pull up, but outside of unhelpful answers of "it's your stylus" (it's not), they all seem to have given up on getting help.
I've tried these apps on my friend's Evo 4G 3D, running Android 4.0.3, and had the same issue. I then tried on my rooted Xperia Play running Android 2.3.3 Gingerbread, and did not have this issue. I'm not entirely convinced it's an OS version that's making the difference, but I'm not able to find much information about the screens these devices use outside of "capacitive touch". I did learn that these screens use the corners to determine the location of input being received, so maybe moving directly in the direction of a corner is causing it to mess up?
Long story short, my questions are thus: is there any way to fix, calibrate, or compensate for this issue? Is it the screen, a hardware issue, or something else? Is there anything I can do?
Thanks for your time.
pWEN said:
I have the Galaxy Tab 2 7.0, rooted with 4.0.4, and have not had any problems with it for the most part.
I recently downloaded Sketchbook Express to see how well the tablet could handle drawing. It handles it very well with one exception: the closer you get to drawing at a 45* angle, the more wavy the lines get. If I quickly swipe in that direction, it straightens out, but the slower I go, the more pronounced the waves or zig zags get. This happens using any of my fingers, the $20 Rocketfish stylus, and the $30 Wacom Bamboo stylus. All attempted on a freshly cleaned screen. I've also tried different apps with the same result. This guy had the same issue, as have others from what research I could pull up, but outside of unhelpful answers of "it's your stylus" (it's not), they all seem to have given up on getting help.
I've tried these apps on my friend's Evo 4G 3D, running Android 4.0.3, and had the same issue. I then tried on my rooted Xperia Play running Android 2.3.3 Gingerbread, and did not have this issue. I'm not entirely convinced it's an OS version that's making the difference, but I'm not able to find much information about the screens these devices use outside of "capacitive touch". I did learn that these screens use the corners to determine the location of input being received, so maybe moving directly in the direction of a corner is causing it to mess up?
Long story short, my questions are thus: is there any way to fix, calibrate, or compensate for this issue? Is it the screen, a hardware issue, or something else? Is there anything I can do?
Thanks for your time.
Click to expand...
Click to collapse
The problem is the digitizer. It's cheap. I think all of the g tabs have this issue. Mine is terrible drawing diagonal lines and even scrolling in landscape mode is choppy. Only way around it from what I can tell is to apply more finger surface area. That seems to fix it. But since you're using a stylus that's not possible. If you find a solution to calibrate the digitizer, please let me know!
I have the same exact problem and the same exact request. There must be some option to increase sensitivity to at least minimize this effect. It's the only flaw I can find on this otherwise wonderful device.
And honestly, for the prize it cost, I would expect this not to exist. But... I have it now and would like to be able to use it in it's full extent and power.
dammit
Nice to know I'm not the only one who notice that, but it's crazy how my finger seems preciser than my pen and even more, that in my Galaxy S the pen works perfectly. I was so happy to use some drawing apps on the tab but when I tried...
I tried in my Tab 7 2, then I'll try on my uncle's 10.1 just to check.
hello all,
just to report the same issue. i have same problem with my samsung galaxy tab 2 7" like you all here. i get this problem since the first time i bought it (about a month ago). drawing the lines and reading in landscape mode is choppy :crying: same as MrHyde03 said. i have been tested my cousin's tablet to draw diagonal line for comparison, he has galaxy tab p1000. and the line result i get, though his tab has wavy line too, but mine has more wavy line than his tablet. i didn't noticed his tablet has so wavy line, just a little. i did it with my finger.
i hope this issue can be fixed later.
could be a solution
I don't know if it's just for marketing or what, but maybe the original Samsung stylus is better for these screens.
I wish someone could certify this...
I bave The Same Problem... Vawy diagonal and arcs. The same pens and fingers works fine on my Asus TF 101...
I have the same problem
gonzogonzo said:
I bave The Same Problem... Vawy diagonal and arcs. The same pens and fingers works fine on my Asus TF 101...
Click to expand...
Click to collapse
Hi guys, I have the same problem. Horrible response when i draw with a (cheap) stylus and perfect when i do it with my fingers. Has anyone tried adonit jot pro or Dagi ??? Maybe they increase the contact area and it solves the problem. If so, please tell us!!!
Thanks for reading and waiting for a solution.
I know this is an old post, but I can't just abandon my own thread! I've done quite a bit of research on this since making this post, and sadly, it's the way the screen is. Strange that my Xperia Play and Galaxy S3 phones can do this, but the Tab 2 was given such a cheap screen. I ended up selling it and putting the money towards a Note 10.1 with S-pen, which works as I would expect it to.

Fix Your Broken/Stuck Accelorometer

I've had a stuck accelerometer problem with phones, but also with my DJI Phantom drone. This problem manifests itself as:
- can't switch or rotate from portrait mode to landscape correctly
- camera won't rotate to landscape
- terrible VR performance, drifting
- bad gaming performance
- sensor readings way off
You're not going to believe the solution that has worked for me in both cases: you gotta bash it!!
Yep, your silicon-based accelerometers have fingers that can deflect with G forces, but when they get a big impact, they can get stuck at the extreme bent side. You probably dropped your phone recently, right?? Well, you can probably fix it by dropping it again in exactly the right way. It's like Fred Flintstone's amnesia.
You'll need to determine which side to drop it onto, and then drop it onto that side HARD onto a hard surface. You don't need to let it go, you kind of slam it with your hand. Do it at your own risk, of course, because you might break some other component!
Here's which side to whack it. For god sakes, don't just whack it randomly.
First, you'll need an accelerometer app. Install it and run it in metric mode. Set your phone on the table. Have a look at your values for X, Y, and Z. Two should be at near 0 and Z should be around 10 m/ss. The 10 reading is the table holding your phone against the force of gravity at 10 m/ss!
One or more of your numbers will NOT be as I stated, and that's the stuck accelerometer. It will be pretty much stuck and hardly changing at all, and it will be weirdly high, much greater than 10. ex: My X was at 167. (If you do not have one of your axis stuck on a very high number, you have a different problem, don't continue.)
If your X value is stuck sky high, hit the phone with the X+ (right) side onto the table
If your X value is a high number, but negative, hit the phone with the X- (left) side onto the table
If your Y value is stuck sky high, hit the phone with the Y+ (top) side onto the table
If your Y value is a high number, but negative, hit the phone with the Y- (bottom) side onto the table
If your Z value is stuck sky high, hit the phone with the Z+ (screen face) side onto the table (good luck to you)
If your Z value is a high number, but negative, hit the phone with the Z- (back) side onto the table
If you hit it sharply enough, you'll notice that the sensor is no longer stuck on the super high reading, and you're all fixed
Look on the bright side, it's not a drone. Since propellers etc get in the way of a table slam, I had to hit my $1200 drone - HARD - with a rubber mallet when it had the same problem. But it worked!
I have a Redmi Note 8 pro and the accelerometer was not working. The Y and Z axis were stuck at high negitive values. I was very frustrated as the camera app took pictures up side down. After searching the internet for a gud hour , I found this solution. I tried it and it worked like a charm. I had to hit my phone on my hand for both -Y and -Z axis. After both directional hits, the accelerometer sprung into action and everything worked smoothly.
Thank you so much. This solved my problem like a charm. This really worked.
Moved from Android Drones, because as the original poster tells me, this applies generally to devices with Accelorometers.
Mike
I still can't believe that it worked like it did. The Z axis on my Redmi Note 7's accelerometer was stuck, and it insta working again after throwing my phone on the floor. This is probably the least thing I would do (willingly) and worked like a charm. Thank you very much.
This post saved me. Almost wiped my Redmi Note 8 Pro. Worked fine just throwing it on the floor LMAO. Nothing like an armor case to protect hahahaha
MY HERO. the pockets in my sweats aren't deep enough so my phone kept falling out and must have konked itself into a hung accelerometer. A few drops on the bottom fixed a stuck negative Y axis. happy day!

Categories

Resources