ManimCommunity / ManimCommunity/manim

Add `HexNumber` and `BinaryNumber` class ala `DecimalNumber`

Open
#2,997 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

new feature
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## Description of proposed feature
I was looking to see if I could explain some CS concepts using Manim and wanted to be able to use Hex and Binary digits for animations. Also preferably I would like to have the option of including or dropping the `0x` or `0b` prefix. The use case that prompted me to search (and to find it can only be done with Decimal numbers) is to animate a rising counter of Hex digits [like the example of a custom animation in the docs](https://docs.manim.community/en/stable/tutorials/building_blocks.html#creating-a-custom-animation).

## How can the new feature be used?
Exactly the same as `DecimalNumber` except for Hex and Binary numbers respectively.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing DecimalNumber implementation and its tests, then review the linked custom-animation documentation example. Add HexNumber and BinaryNumber with DecimalNumber-like behavior, including optional 0x and 0b prefixes, and verify that the classes support the rising-counter animation use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.