A while ago, I thought one could use trigonometry. Simply have the actors hold the base of the light saber, and the stick part would be generated by the computer.
In the prequel trilogy, with newer technology, rendering lightsabers became easier.
Simply have the actors hold the base of the light saber, and the stick part would be generated by the computer.
Your thinking was correct, except the actors were given an entire fake lightsaber to wield, possibly because it would make all fight scenes more realistic if they were pressing against each other in a fighting style.
The lightsabers were coloured so that they would contrast with their environments, and then could be digitally altered. This is basically the reverse of how green screen technology works (where the background is altered and the foreground remains the same). it is very common, when animating GC, to have green markers to plot out where a character or animal is going to be, therefore very likely this was used for Star Wars.
Moreover, here is some behind-the-scenes evidence:
The second image in particular is useful as it shows how, when both a green screen and green prop are needed, the prop can also change colour, i.e, the lightsabers are both "red" here, and can be altered later.
It took animator Nelson Shin only a week to render the first lightsaber footage for the original trilogy. The lightsabers were drawn on by a process called "rotoscoping". This is mentioned in the wikipedia page on lightsabers , and was, effectively, an animation style which superimposed the image of the lightsaber onto the aforementioned props. (credit for this find to CBredlow)
He suggested inserting one frame that was much lighter than the others while printing the film on an optical printer, making the light seem to vibrate.
Another interesting fact is that the shakiness of the lightsabers was a deliberate design, due to the fact that they were made of light.
"since a lightsaber is made of light, the sword should look "a little shaky" like a fluorescent tube."
In the original trilogy, the lightsabers were actually drawn on, because of the way the prop lightsaber was colored. This animation technique is called 'rotoscoping' and is used lots of places (my favorite being the music video for 'Take on me' by A-ha) Source: Wikipedia