Strange excess on shape when trimming or diving shapes - adobe-illustrator

I'm using Illustrator 25.2.2 and have stumbled on an odd issue when I either use trim or divide on certain shapes. It adds a kind of stroke at certain nodes, see below screen shot. I'm not sure how or why this is produced, and keen to now if anyone else has had a similar issue. Shape is one the left and zoomed in portion of issue is one the right.

Try to toggle CPU/GPU preview (Command-E). Sometimes it's just a glitch with GPU preview.

Related

Positioning items dynamically for different screensizes

Good morning!
I'm currently trying to create a view similar to this mockup.
I have put down 3 different screen sizes so you can see the issue.
I have a header background image (grey box) with an angled bottom. On the right I want to display an image, which obviously needs to be positioned.
Positioning it horizontally is no issue but how can I position the image vertically? I have it positioned fixed for one screen size but obviously need to make it flexible.
Any ideas? Help would be much appreciated!
David
You can definitely use measure as #rajesh pointed out, or you can use Dimensions. As far as getting the layout consistent across devices, using position absolute and measuring the device height should allow you to get consistency across these devices.
Check out this example I set up, it should be a good starting point at least.
https://rnplay.org/apps/pSzCKg

Reduce noise/improve shapes from an Image

With imagesegmentation I segmented objects from a webcam. But because of the bad light I get a lot of noise in the picture. I want now to improve the shape of the found objects. The only method i found is image opening and closing but the result is no as good as I wished. Does anyone know some other methods?
In this folder I have the orginal image after the segmentation, the image after closing, and a picture of what kind of picture I'm looing for.
Thanks in advance
You could try the opening-closing combination operator. This provides a better smoothing of the shapes. Further more varying the radii of opening and closing (called the ASF - alternating sequential filtering) produces smoother results.
There are a few demos online that use fourier desciptors. Its also important to choose a good shape of structuring elements, since your closing seems to close convex holes in the image.
If it is salt/pepper noise, a simple median filter may be better.

Check if circles completely cover an area

Starting with an arbitrary rectangle, a user can place any number of circles within.
The circles are allowed to overlap each other without restrictions.
The circles can be of different sizes.
What would be the best way to test if the rectangle is completely covered by the circles?
It seems a very tricky algorithm, but fortunately dsomebody thought about it before :)
Check this question:
https://cs.stackexchange.com/questions/11163/circles-covering-a-rectangular-how-to-verify-it
Seems to have the same problem as you.
I eventually found that the simplest solution (for me anyway) in both JS and Objective-C was to simply iterate of over each pixel and check for the colour (assuming circles are coloured) and check if it was the colour of a circle (or it's border). As soon as a colour from a circle was found then iteration stops as the area is obviously not fully covered by the shapes.
The advantage to this solution is that the actual shape doesn't matter (we ended up adding other shapes also).

libgdx tiledmap flicker with Nearest filtering

I am having strange artifacts on a tiledmap while scrolling with the camera clamped on the player (who is a box2d-Body).
Before getting this issue i used the linear filter for the tiledmap which prevents those strange artifacts from happening but results in Texture bleeding (i loaded the tiledmap straight from a .tmx file without padding the tiles).
However now i am using the Nearest filter instead which gets rid of the bleeding but when scrolling the map (by walking the character with the cam clamped on him) it seams like a lot of pixel are flickering around. The flickering results can get better or worse depending on the cameras zoom value.
But when I use the "OrthoCamController" class from the libgdx-Utilities which allows to scroll the map by panning with the mouse/finger i don't get these artifacts at all.
I assume that the flickering might be caused by bad camera-position values received by the box2d-Body's position.
One more thing i should add here: The game instance runs in 1280*720 display mode while my gamecam renders only 800*480. Wen i change the gamecam's rendersolution to 1280*720 i don't get those artifacts but then the tiles are way too tiny.
Has anyone experienced this issue or knows how to fix that? :)
I had a similar problem with this, and found it was due to having too small a decimal value for the camera position.
I think what may be happening is some sort of rounding with certain tile columns/rows in the tilemap renderer.
I fixed this by rounding to a set accuracy, like so:
camera.position.x = Math.round(player.entity.getX() * scalePosition) / scalePosition;
Experiment with various values, but I got it working by using the tile size as the scalePosition value.
About tilesets, I posted a solution here: Getting gaps between tiled textures with libgdx
I've been using that method with Tiled itself. You will have to adjust "margin" and "spacing" when importing tilesets in Tiled to get the effect working.
It's 100% working for me :)

Detecting what percent of an drawn image has been "erased"

Let's say I have a solid, irregularly shaped (but enclosed) shape on screen in iOS (one colour). I then want to "erase" portions of that shape by dragging my finger around like you would in a typical kids colouring app, erasing with a fixed brush size where I touch the screen.
I could easily accomplish all this with something like an image mask and touch detection however, as a requirement, I also need to determine the rough percentage of the shape that remains.
For example I need to know when 50% of the random enclosed shape has been "erased".
What's the best way of approaching this problem? Are there any existing iOS compatible libraries that can handle it? I'm thinking that I would need to keep track of a ton of polygons and calculate all the overlaps but it seems like there must be a solution to this problem.
EDIT: I have done research into this problem however tracking all the polygons manually and calculating all their positions and area overlaps seems overly complicated. I was simply wondering if anyone else has run into a similar issue and found a better solution.
you will need to first know the fixed space of the image view. then you will need to know the percentage of blank space when the new image is loaded. pixel
double percentageFilledIn = ((double)nonBlankPixelCount/totalpixels);
After you get that value you will need to use that percentage as your baseline for the existing percentage
your new calculation will look like this.
double percentageOfImageLeft = ((double)nonBlankPixelCount/totalpixels/percentageFilledIn);
this calculation will likely be processor intensive. I would only calculate sparingly.
Since this post is not about code and more about login I will let you determine your logic for detecting non blank pixels.
here is how to find a pixel color.
How to get Coordinates and PixelColor of TouchPoint in iOS/ObjectiveC
Good luck.