radially equidistant "melting" of image onto spheroid (head) - reverse of equidistant azimuthal projection noob here wanting to "melt" a radially symmetrical mesh (SVG at the moment) onto a 3D scan of my head (STL at the moment) to eventually make a 3d printed scalp-conforming hat/cap (so projecting onto a convex spherish surface) in such a way that there is no distortion in distances from the center of the image (in other words the reverse of an equi-distant azimuthal projection (aka EDAP) of a sphere onto a plane https://en.wikipedia.org/wiki/Azimuthal_equidistant_projection

Feel free to sacrilegiously suggest plugin X of program Y (any major OS) that is not blender, as I am just starting.  

Responding to comments: Yes this is projecting a flat surface image on something sphere like.  Pretend for the moment that the latter is a globe.  At first I thought something like UV Project modifier would work, if the flat image were transformed first in a fisheye lens kind of way.  But lets say the image is projected from above the north pole of the globe.  As the projected image gets close to the equator it gets more and more distorted and any errors will be magnified and be noticeable (especially in a shape that is not quite a sphere like a head).  Also the shape might in some cases keep wrapping to points south of the equator which the projection can't reach.  A better metaphor than projection, especially for an imperfect sphere, might be shrink wrapping or melting (or blow molding if it was on the inside).  The radial distances of points in the image to the center point on both the original planar image and on the spheroid, need to match up fairly well or this particular image will look unpleasantly distorted.  The fact that the other polar dimension is distorted (compressed if you think about it) will not be particularly unpleasant.  

For an example of doing what I want see the wikipedia page above and think bout going in the opposite direction from flat map to globe.  Anyway my local hackerspace buddies thought blender had the best chance of working, and I had played with it a little in the past and so here I am.
A solution based on Python (image and svg found here) :



The script :

import bpy
import bmesh
from math import *
from mathutils import Vector

#Reposition the mesh vertices calculating a 'reverse of equidistant azimuthal projection'
def reverseOfEquidistantAzimuthalProjection( model, propFactor = 1 ):

    rad90 = radians(90.0) #A way to have pi / 2

    modelData = model.data

    #Calculates vertices boundings (relative to vertices coordinates, because of the case of a not centered mesh)
    minX = min( [v.co[0] for v in modelData.vertices] )
    maxX = max( [v.co[0] for v in modelData.vertices] )
    minY = min( [v.co[1] for v in modelData.vertices] )
    maxY = max( [v.co[1] for v in modelData.vertices] )

    #Center in X and Y, we consider here a flat mesh in Z
    centerX = (minX + maxX) / 2.0
    centerY = (minY + maxY) / 2.0
    center = Vector( [centerX, centerY, 0] )

    #Radius of the projection
    baseRadius = (maxX - centerX)

    for v in modelData.vertices:
        pos = Vector( v.co )

        #Position relative to center        
        posXY = pos.xy - center.xy

        #Proportionality of the vertex relative to the radius
    #Between 0 and 100% where 0 corresponds to north pole and 100 to south
        prop = posXY.length / baseRadius

        #Conversion to -90 (south) / +90 (north) (in rads)
        angle = rad90 - (prop * pi) 

        #Relocation in X and Y : cos(angle) gives the radius of the cut
        posXY.normalize()
        posXY = posXY * baseRadius * cos(angle) * propFactor

        #Set the vertices new coordinates
        v.co[0] = center.x + posXY.x
        v.co[1] = center.y + posXY.y
        #In Z : keeps the eventual Z value and place the point relatively to that
        v.co[2] = v.co[2] + sin( angle ) * baseRadius * propFactor


model = bpy.context.object

reverseOfEquidistantAzimuthalProjection( model )


The first experiment is based on a circle extruded and cut :


I have also try to use the svg symbol of the United Nations. Some difficulties :


The curves are in a lot of parts (you may have to select them all, convert to mesh and join them)
Edges are made 'as they come', so applying the script gives some unwanted results (some edges may have to be removed manually)