Cinema 4D draws splines in rendering in several ways without requiring any coding, you can use the inbuilt systems (Hair, Sketch & Toon, Geometry), or plugins (Storm Tracer, DPit, DiTools etc), or write your own.
To render splines directly you have a whole load of options, if you want to take full control you would need to pick whichever method suits you best. A simple method would be to do a high quality viewport render of your splines, grab it and simply combine it with your standard render. But you might want to do your own raytracing or scanlining of your splines instead,
Honestly it sounds like you’re trying to bite off a little more than you can chew right now, but it’s not as scary as all that. For you to succeed you should just break down the task into easier to manage parts.
So lets break down spline rendering itself should you wish to go this route, the most common method of dealing with this are to either create geometry and let the render engine deal with all the tessellation, BSP sorting and optimizing. You deal with them as volumetric isosurfaces and can calculate all the hits yourself if you want, but it’s a lot more involved and I think you’d rather go for a quick and dirty method.
This is very easy in Cinema, the fastest route would be to invoke a script that swept a single line along your splines at rendertime in the render document (this would hide the geo from the viewport). You can do this in more or less any “Node” plugin i.e. SceneHookData, VideoPostData (with inherent flag), even TagData, MaterialData, Object data if you had those in scene. You can catch the message from the document that it’s about to render and modify the document however you want at that point. Just be sure to erase your geometry from the document if the render is a viewport render rather than an external render. Another option is within a VideoPostData::Execute function, the SDK docs explain the order of execution on this. To actually generate the sweep why not simply use a sweep generator, this gives you access to e.g. rail splines, or the inbuilt curves for width, twisting etc and solves the problem of you having to learn about LineObject’s, PolygonObject’s and the (pretty simple, but when you’re starting out probably more than you need to know) math involved in generating the correct geometry.
After you’ve created your geometry you’ll want to add a material, I’d imagine you’re after a flat shaded set of lines, so again no need to make a new material, just use the standard one, only enable the luminance channel and if wanted add a gradient (along U) and apply that to your geometry object.
If you want a constant size (i.e. ignore perspective), then either use the opengl/software shading viewport render to get your splines (very fast) or you can scale up the width of your rail by viewport distance to compensate. Obviously it’s just screen size = actual size / distance to eye, however doing some basic math would be effort, so why bother when there are functions for this stuff already built right in. What you need is both in the BaseDraw and VolumeData, personally I’d opt for the BaseDraw as you’ll be generating your geometry actually outside of the render engine, so call BaseDocument::GetRenderBaseDraw() with the current document to get your basedraw, then use the BaseDraw::PW_S() function to give you a unit scale to use for each pixel at the depth passed (i.e. the z-depth of each line point of your sweep).
If you have specific questions you may have more luck on plugincafe.com or in the scripting subforum of the Cinema 4D area here.