London - Did you read Roald Dahl’s Charlie And The Chocolate Factory as a child, then dream of creating your own sweets? Well, that fantasy is now possible.

American company 3D Systems has unveiled a confectionary ‘printer’ that spins sugar and gelatine into intricate 3D designs. The printers can turn a basic mix of ingredients - sugar, water and flavourings - into any geometric shape, from a cube, star or snowflake to a hexagon or pyramid.

Software builds up the sweets by printing one layer at a time. A single gum drop might consist of several thousand layers of solidified sugar water.

Coloured flavourings, such as sour apple, vanilla, cherry or mint, can be added in layers, giving the sweets multiple flavours and ornate patterns.

Similar 3D printers already exist to allow you to make your own chocolate and pasta shapes.

The Chefjet printers will go on sale later this year, costing around £6 000 - which is a lot to pay for a packet of sweeties.