The last few weeks I developed all sort of spline evaluation stuff for my Animation Nodes addon. For that I created a small library that deals with curves. (Bezier and Poly splines for now only)
When you want to use this package for your addon, you should make a multifile addon. To explain how that works isn't the topic here. You may want to google it, look at other multifile addons or ask another question here on stackexchange.
Then create a new folder in your addon directory called 'splines' or whatever.
And copy the content of this folder inside:
https://github.com/JacquesLucke/animation_nodes/tree/curve-sockets/data_structures/splines
(I hope this link will still be available after I removed the branch, otherwise tell me in the comments)
Here is how to use this library:
from . spline import from_blender
# the object can be any blender object, but should be of type CURVE obviously
# it returns a list of splines, because one curve object can contain multiple splines
user_splines = from_blender.createSplinesFromBlenderObject(object)
# choose the spline you want to use
active_spline = user_splines[0]
# only needed when you want the spline in world space
active_spline.transform(object.matrix_world)
# this internally creates the individual segments (at least for Poly and Bezier Splines)
# and prepares everything for evaluation
active_spline.update()
# get 50 points distributes over the spline
samples = active_spline.getSamples(50)
# getting samples with equal distances is a bit more complicated
active_spline.ensureUniformConverter(resolution = 100)
uniformSamples = active_spline.getUniformSamples(50)
# To evaluate individual parameters (what you called apex):
location = active_spline.evaluate(0.5)
# The same applies for evaluating the tangents/derivatives of the spline
tangents = active_spline.getTangentSamples(50)
uniformTangents = active_spline.getUniformTangentSamples(50)
tangent = active_spline.evaluateTangent(0.5)
For more details you may want to take a look at the code