I need a form to control the paramethers with sliders for this code. The form has not to block rhino, so i must be able to use it
using System;
using System.Collections.Generic;
using Rhino;
using Rhino.Commands;
using Rhino.Geometry;

namespace TestingVisualTech
{
    public class Lamp : Command
    {
        public Lamp()
        {
            Instance = this;
        }

        ///<summary>The only instance of this command.</summary>
        public static Lamp Instance { get; private set; }

        public override string EnglishName => "SemplifiedTexturedLamp";

        protected override Result RunCommand(RhinoDoc doc, RunMode mode)
        {
            // --- Parametri Generali ---
            double height = 320;
            double baseRadius = 100;
            double neckRadius = 80;
            double twistAmount = 2 * Math.PI * 0.5;

            // --- Parametri Onde Principali ---
            double mainWaveDepth = 0.15;
            int mainWaveCount = 15;

            // --- Parametri Texture Verticale ---
            double textureDepth = 0.28;
            // RIDOTTO textureCount per linee verticali meno fitte
            int textureCount = 60;

            // --- Risoluzione (RIDOTTA per semplicità) ---
            // RIDOTTO sectionCount e pointsPerSection
            int sectionCount = 30;
            int pointsPerSection = 150;

            var sections = new List<Curve>();

            for (int i = 0; i < sectionCount; i++)
            {
                double t = (double)i / (sectionCount - 1);
                double z = t * height;

                double profileFactor = Math.Sin(Math.PI * t);
                double radius = baseRadius + (neckRadius - baseRadius) * profileFactor;

                double twist = twistAmount * t;

                var pts = new List<Point3d>();
                for (int j = 0; j < pointsPerSection; j++)
                {
                    double angle = 2 * Math.PI * j / pointsPerSection;
                    double twistedAngle = angle + twist;

                    double mainWaveDelta = mainWaveDepth * Math.Sin(mainWaveCount * twistedAngle);
                    double textureDelta = textureDepth * Math.Sin(textureCount * twistedAngle);

                    double combinedModulation = 1.0 + mainWaveDelta + textureDelta;

                    double r = radius * combinedModulation;

                    double x = r * Math.Cos(angle);
                    double y = r * Math.Sin(angle);

                    pts.Add(new Point3d(x, y, z));
                }

                pts.Add(pts[0]);
                var curve = Curve.CreateInterpolatedCurve(pts, 3, CurveKnotStyle.Uniform);
                if (curve != null && curve.IsValid)
                    sections.Add(curve);
            }

            var loft = Brep.CreateFromLoft(sections, Point3d.Unset, Point3d.Unset, LoftType.Tight, false);

            if (loft != null && loft.Length > 0)
            {
                Brep resultBrep = loft[0];
                resultBrep.CapPlanarHoles(doc.ModelAbsoluteTolerance);

                doc.Objects.AddBrep(resultBrep);
                doc.Views.Redraw();
                RhinoApp.WriteLine("Lampada semplificata con trama verticale generata.");
                return Result.Success;
            }

            RhinoApp.WriteLine("Errore nella generazione del Loft.");
            return Result.Failure;
        }
    }
}