PHPackages                             rimelek/columns3d - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. rimelek/columns3d

ActiveLibrary[Image &amp; Media](/categories/media)

rimelek/columns3d
=================

Library to create 3D-like columns with GD extension

v2.0.0(9y ago)04MITPHPPHP &gt;=7.0

Since Oct 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/rimelek/php-columns3d)[ Packagist](https://packagist.org/packages/rimelek/columns3d)[ RSS](/packages/rimelek-columns3d/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (3)Used By (0)

Description
===========

[](#description)

Using this library you can create images of different type of columns. If you use linear gradient on the column's wall, you can draw 3D-like shapes. It is mainly just for fun and learn algorithms used by the library.

See some examples: [examples.md](example/examples.md)

Installation
============

[](#installation)

```
php composer.phar require rimelek/columns3d:2.*

```

Requirements
============

[](#requirements)

- PHP &gt;= 7.0
- GD extension

Usage
=====

[](#usage)

Drawable elements
-----------------

[](#drawable-elements)

To start drawing you need to define a canvas

```
use Rimelek\Columns3D\Canvas;
use Rimelek\Columns3D\CanvasConfiguration;
use Rimelek\Columns3D\Color;

$cc = new CanvasConfiguration();
$cc->setHeight(300);
$cc->setWidth(300);
$cc->setType(Canvas::TYPE_JPEG); //Canvas::TYPE_PNG and Canvas::TYPE_GIF are also supported
$cc->setQuality(50); // Only in case of JPEG
$cc->setColor(new Color(255, 0, 0)); //RGB

$canvas = new Canvas($cc);

```

All methods of CanvasConfiguration are optional.

You can add elements to the canvas with addElement().

```
use Rimelek\Columns3D\PositionedElement;

// ...

$canvas->addElement(new Positionedelement($drawable, /*x*/ 200, /*y*/ 200));

```

$drawable object must implement Rimelek\\Columns3D\\Drawable\\DrawableInterface

Currently 2 classes are available:

**StripedPattern**

This is to add a striped background. For now, it does not support customization.

```
use Rimelek\Columns3D\Drawable\StripedPattern;

// ...

$background = new StripedPattern();
$canvas->addElement(new Positionedelement($background, 150, 150)); // background and the center of the canvas

```

**Column**

```
use Rimelek\Columns3D\Drawable\Column;
use Rimelek\Columns3D\Drawable\ColumnConfiguration;
use Rimelek\Columns3D\LinearGradient;

// ...

$colc = new ColumnConfiguration();
$colc->setRadius(100);
$colc->setVeticalAngle(0.2); //This is for 3D. Define it between 0 and 1. Greater values mean you look at the column from higher.
$colc->setHeigh(300);
$colc->setWallGradient(new LinearGradient(new Color(0, 0, 0), new Color(255, 255, 255)));
$colc->setColor(new Color(200 200, 200));

$column = new Column($colc);
$canvas->addElement(new PositionedElement($column, 200, 200));

```

All methods of ColumnConfiguration are optional.

Generator classes
-----------------

[](#generator-classes)

There are two generator classes too.

**PositionGenerator**

It is to generate positions of an ellipse to use it in a foreach loop.

```
$positionGenerator = new PositionGenerator($centerX, $centerY, $step /* Default is 1*/);
foreach ($positionGenerator->call(/* start degree*/ -150, /* end degree */ -30) as list($x, $y)) {
    $this->addElement(new PositionedElement($drawable, 200 + $x, 200 + $y));
}

```

**ColumnCircleGenerator**

Itt uses PositionGenerator to generate circle made of columns.

```
$columnCircleGenerator = new ColumnCircleGenerator($positionGenerator, $columnConfiguration);
foreach($columnCircleGenerator->call(/*degree*/$from, /*degree*/$to, $centerX, $centerY) as $e) {
    $canvas->addElement($e);
}

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3507d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9f56406d664409994614829395e195538afebee4f5d35abc02769a099f187ba4?d=identicon)[rimelek](/maintainers/rimelek)

---

Top Contributors

[![rimelek](https://avatars.githubusercontent.com/u/8455727?v=4)](https://github.com/rimelek "rimelek (15 commits)")

---

Tags

columnsgd-extensionphp

### Embed Badge

![Health badge](/badges/rimelek-columns3d/health.svg)

```
[![Health](https://phpackages.com/badges/rimelek-columns3d/health.svg)](https://phpackages.com/packages/rimelek-columns3d)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k22](/packages/bkwld-croppa)[marc1706/fast-image-size

fast-image-size is a PHP library that does almost everything PHP's getimagesize() does but without the large overhead of downloading the complete file.

959.4M20](/packages/marc1706-fast-image-size)[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495225.1k1](/packages/char0n-ffmpeg-php)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
