PhongShading: How to HALF fill a cylinder with color? lazarus / 39-Graphics ---------------------------------------------------------------------- Awesome Programmer · 2025-07-22 19:49 I've been playing with PhongShading lately and I actually like and enjoy testing PhongShading. However, in my program I want to not only draw a cylinder but also mimic cylinder half full with color using FILL or any procedures or functions. For the life of me, I can't seem to find any example anywhere on the internet. Can some please show me how? thanks. Oops! I forgot to include my code. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, BGRABitmap,BGRABitmapTypes,  BGRAGradients, fpWeb, fpHttp; type   { TForm1 }   TForm1 = class(TForm)    procedure FormCreate(Sender: TObject);    procedure FormDestroy(Sender: TObject);    procedure FormPaint(Sender: TObject);  private    { private declarations }  public    { public declarations }  end; var  Form1: TForm1;  Phong:TPhongShading; implementation {$R *.lfm} { TForm1 } procedure TForm1.FormCreate(Sender: TObject);begin  Phong := TPhongShading.Create;  Phong.LightPositionZ:=150;  Phong.SpecularIndex:=20;  Phong.AmbientFactor:=0.3;  Phong.LightSourceIntensity:=250;  Phong.LightSourceDistanceTerm:=200;end; procedure TForm1.FormDestroy(Sender: TObject);begin  phong.Free;end; procedure TForm1.FormPaint(Sender: TObject);var  image:TBGRABitmap;begin  image := TBGRABitmap.Create(300,300,ColorToBGRA(ColorToRGB(clbtnface)));   Phong.DrawVerticalCylinder(image, rect(20,20,120,400),50,BGRA(255,0,0));  phong.LightPosition := Point(100,100);   image.Draw(Canvas,0,0,True);  image.free;end; end. ---------------------------------------------------------------------- TBMan · 2025-07-22 23:28 I'd draw a half sized filled cylinder in an unfilled large cylinder if I really had no other choice.