How can I combine three spheres properly - blender

I'm trying to combine three spheres in a way that I can be able to modify the crease, like making the crease sharper or more round. I've tried using boolean but it doesn't come out quite right when I use subdivision modifier or when I use smooth shade.
three spheres
three spheres combined using boolean and smooth shade

Related

Is there a GIMP function to remove background by combining layers with one object on different backgrounds?

In case the title confused you. I want to remove the background around the object. The boundary is rather complex, so doing it by hand is time-consuming. However, I have several images of one object on different backgrounds.
So I've put these images on different layers, so the object on each layer is in the same place. Now I would like to combine all layers in one, so the object would persist, but different layers would be removed. Is there a function/filter/script that works this way? Taking pixels from different layers and if they are different removes them or makes them (more) transparent? While pixels that don't differ are left unchanged.
I've tried "addition" and "multiply" modes for layers, but they don't work that way - they still change pixels that are "the same".
With two images:
Set the top image to Difference
Get a new layer from the result: Layer>New from visible
Color-select the black with a low threshold.
Your selection is the pixels that are black, that are those where the difference between the images was 0, that are those that are identical in both images.
With more images
A solution likely uses a "median filter". Such a filter makes pixels "vote": a pixel is the most common values among the corresponding pixels in each of the source images. This is typically applied to remove random objects (tourists) in front of a fixed subject (building): take several shots, and the filter will keep the pixels from the building, removing the tourists.
There is a median filter in the GMIC plugin/filter suite. Otherwise if you have good computer skills (some install tweaks required) there is an experimental one in Python.
However the median filter doesn't erase the background so the technique is likely more complex than the tourist removal one. Can you show a sample picture?

Setting control points for Cytoscape edges?

I'm trying to build a descending graph in Cytoscape. I've got the majority done quite well, but now I'm stuck on the edge types. I'd like to use something like the 'segments' curve-style, where my edges have points.
However, instead of being zig-zags, I would like the edges to be constrained to horizontal/vertical lines.
My graph is pretty constrained and the user cannot manipulate the positions. I would like the edges to start at the 'parent' element, go straight down a set amount, then hit a point, turn, head horizontally to the same X as the child, then straight down to the child element.
Right now, the lines go straight, and I can add segments easily, but they aren't constrained and are based on percentages that I won't have access to without doing a bunch of math, which I guess isn't terrible.
Current:
Desired:
If you want specific absolute positions on segments edges, you'll need to convert the absolute co-ordinates to the relative co-ordinates that you specify for segments edges.
If you want a different type of edges for your usecase, feel free to propose it in the issue tracker.

Circular panning with matplotlib

I'm looking for a way to have interactive "circular panning" with matplotlib: when
interactively moving the axes to the left or the right, I want the data
(and axes labels) to "wrap around". (An (silly) example application would
be e.g. plotting annual average temperatures, and wanting to look at
whether anything special is happening around New Year.)
Is there a simple way to achieve this?

How should I determine how far apart the markers of two points are?

In Matplotlib, is there an idiomatic way to tell how far apart two markers are with the present zoom level and marker style? Or, even better, is there a way to determine how much two markers overlap?
The reason I'm asking is that I'm making some plots that are sort of like scatter plots, wherein two points at the same coordinate (or very very nearby) has significant meaning, and it's important that I know when the (identical) symbols used for the points obscure each other. I want to determine the degree to which the symbols (again, for the chosen symbol type, size and zoom level) overlap, and amend the plot with some text to signify the degeneracies.

Calculating the area and position of dynamically formed polygons

Hi stackoverflow community,
This is a continuation of a question I asked 6 months regarding calculating the area and position of dynamically formed rectangles. The solution provided for that worked a treat but now I want to take this a step further.
Some background - I'm working on a puzzle game using Cocos2D/Box2D were the player draws lines on the screen. Depending on were the player draws, I want to then work out the area and position of polygons that appear as a result of the drawn lines.
In the following image, the black border represents a playing area, this will always be the same shape. The grey lines are player drawn and will always be straight. The green square is an obstacle. The obstacle objects will be convex shapes. The formed polygons (3 in this case) are the blue areas and are the shapes I'm trying to get the coordinates and area for.
I think I'll be fine with working out the area of a polygon using determinants but before that, I need to work out the coordinates of the blue polygons and I'm not sure how to do this.
I've got the lines (x,y) coordinates for both ends, the coordinates for the obstacle and the corner coordinates for the black border. Using those, is it possible to work out the coordinates of the blue polygons or am I approaching this the wrong way?
UPDATE - response to duffymo
Thanks for your answer. To explain further, each object mentioned is defined and encapsulated in a class i.e. I've got a Line/Obstacle/PlayingArea object. My polygon object is encapsulated in a 'Rectangle' object. Each one of these objects has it's own properties associated with it such as its coordinates/area/ID/state etc...
In order to keep track of all the objects, I've got an over-seeing singleton object which holds all of the Line objects / Obstacle objects etc in their own respective array. This way, I can loop through say all Lines and know were each one has been drawn by the player.
The game is a bit like classic JezzBall so I need to be able to create these polygon shapes when a user draws a line because the polygon shape will be used as my way of detecting if that particular area contains a ball. If not the area needs to be filled.
Since you already have the nodes and edges for your polygons, I'd recommend that you calculate the centroids, perimeters, and areas using contour integration You can express the centroids and areas as contour integrals using Green's theorem.
You can use Gaussian quadrature to do piecewise integration along each edge.
It'll be fast and accurate; it'll work on polygons of arbitrary complexity.
UPDATE: Objective-C is an object-oriented language. I don't know it myself, but I believe it's based on ideas from C and C++. Since that's the case, I'd recommend that you start writing more in terms of objects. Arrays of coordinates? They need to encapsulated together. I'd suggest a Point abstraction that encapsulates a point (id, x, y) together. Make a Grid that has a List of Points.
It sounds like users supply the relationship between Points to form Polygons. That's not clear from your description, so it's not a surprise that you're having trouble implementing it.