I’m trying to produce this equation in VB.NET

h = (sh * s + (dia / 2 (tan(ang))) + ((dia / 2 (tan(ang1))) / 3))

This is where I’d prefer to retrieve the data from.

Sh = sheet height = 1 (can be variable)(data retrieved from textbox)

S = sheets (vertical) = from 1 to 30 (data retrieved from combobox populated by sql server in real format)

Dia = diameter of barrel = from 3 to 50 (data retrieved from combobox populated by sql server in real format)

Ang=angle=between20&80deg(data retrieved from textbox)

Ang1=angle=between20&80deg(data retrieved from textbox)

To explain what this is doing, imagine a pencil sharpened at both ends and you wish to work out the overall length, the barrel I’ve split into sections i.e. sh * s and the height of the top point is one third i.e. ((dia / 2 (tan(ang1))) / 3)), add the height of the barrel and the bottom cone plus one third of the top.

I hope this is clear enough, as you can see explanations aren’t my forte.

Thank you prior for any help.

Ross