# Halftone with custom shape or typography

**URL:** <https://discourse.processing.org/t/halftone-with-custom-shape-or-typography/39767>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [November 17, 2022, 9:40pm UTC](https://discourse.processing.org/t/halftone-with-custom-shape-or-typography/39767 "2022-11-17T21:40:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eddg101](https://avatars.discourse-cdn.com/v4/letter/e/e9c0ed/32.png) [@eddg101](https://discourse.processing.org/u/eddg101)\
**Post date:** [November 17, 2022, 9:40pm UTC](https://discourse.processing.org/t/halftone-with-custom-shape-or-typography/39767/1 "2022-11-17T21:40:44Z")

</div>

> please format code with \</\> button \* [homework policy](https://discourse.processing.org/faq/#homework) \* [asking questions](https://discourse.processing.org/t/2147)

Does anyone know how to create half tone images with custom shapes or an imported shape?  
Also want to achieve this effect with typography, the image will dictate the size of the shapes to create an half tone.

Similar to the attached image:

 ![7add6ec1d2332bd8a611ee21e7a78069](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/f/6/f6096a9fa564ddc702cf270447223e96b5473df3.jpeg)

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [November 18, 2022, 10:12am UTC](https://discourse.processing.org/t/halftone-with-custom-shape-or-typography/39767/2 "2022-11-18T10:12:25Z")

</div>

Hi @eddg101,

Welcome to the forum! 😉

> [@eddg101](#):
>
> Does anyone know how to create half tone images with custom shapes or an imported shape?

Do you already know how to replicate a Halftone effect with simple shapes like dots, circles or squares?

If not here is a way to do it:

- Go through each pixel in the image (with a bigger step so shapes won’t overlap)
- Get the current pixel brightness value
- Display a shape at that point in space with varying thickness / size or fill depending on the brightness (play with a threshold)

Then using a custom shape is simple, you can display it in the third step or load a SVG from a file and input any shape you want (with responsive size).

---

<div class="post-metadata">

**Author:** ![eddg101](https://avatars.discourse-cdn.com/v4/letter/e/e9c0ed/32.png) [@eddg101](https://discourse.processing.org/u/eddg101)\
**Post date:** [November 18, 2022, 10:26am UTC](https://discourse.processing.org/t/halftone-with-custom-shape-or-typography/39767/3 "2022-11-18T10:26:12Z")

</div>

Hey Joseph, Yes I can create a half tone pattern using solids, circles squares diamonds etc.

Thanks for your feedback ill give this a go.

Legend!
